Insert subtotals in blank cells in Excel

I just completed a complicated exercise where I expanded upon an existing table using VLOOKUP.  My next step was to insert subtotals in each of the new columns of the modified table.  But, the original subtotals in the original table
were text, not formulas.   So, I had to insert new subtotal formulas in each cluster of the table.  This was time-consuming, because each grouping contained a different number of rows.
Q:  How could I have instructed Excel to insert subtotals quickly for each set of rows in the new table, without having to enter a new range of cells in each formula?  The subtotals would have to land in the blank cells underneath each cluster
of data.
Doug in York PA
Douglas R. Eckert

I'm not quit sure what's your table looks like.
If you want to excel insert a formula to the blank cells under each cluster of data. You may need to use VBA code to achieve that, otherwise I don't think excel will be so smart that can insert formula automatically.
And how is it time consuming to enter the formula? since you have said they are all formatted as table, you can take advantage of the column names in the formula.
Maybe you can share your file with us, meanwhile if you hope to find some VBA code to achieve it, you can post your question to the forum for Excel Developer:
http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
Best Regards,
Wind

Similar Messages

  • Blank Cells in Excel until highlighted

    Hi,
    I have an Excel document with a lot of formulas and so on, intermittently, the cells when i scroll down for instance some cells are blank, not all, just a random few. They have either formulas in or an actual value, when i select them i can see the contents
    in the formula bar at the top but not in the cell. If I highlight a number of cells, not just a single cell, it then shows what it is supposed to show. Then later on it will happen to another bunch of cells. The only consistency is that the value or the sum
    of the formula equals zero in every cell it happens to, it does not happen to a cell with a number above zero in.

    Hi,
    Since you want to highlight blank cells, you can apply conditional formatting > Highlight Cells Rules.
    For more reference about Conditional Formatting:
    http://office.microsoft.com/en-001/excel-help/quick-start-apply-conditional-formatting-HA010370614.aspx
    http://office.microsoft.com/en-001/excel-help/use-a-formula-to-apply-conditional-formatting-HA102809768.aspx
    Regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • When I create a PDF from Excel, there are blank cells in Excel document, when they convert to PDF the blank cells have data in them?

    There are cells in the excel document that have formula's in them.  The formulas are pulling data from other blank cells, so that is why they are blank in the formulated cells.  So in Excel, they are just a dash.  When I create the PDF, the document gets opened in Acrobat and the once blank cells have data in them.  Not sure why there is data in those fields on the PDF if its blank on Excel.

    Not really sure that I fixed the problem, but I did find a work around and wanted to post it if someone else runs across the same issue. Apparently the document creator used lots of custom rules and shading. If I pulled up the custom rules and shading palette and just unchecked both the custom ruling and shading boxes, it allowed me to create the print file correctly--the disappearing part numbers were on the new PDF. I didn't have to update the whole book which I didn't want to do because I feared it would mess up the rules and shading. Just unchecking the box before creating the PDF solved that issue for my purposes.

  • How to get rid of all the extra blank cells in excel export

    Hi I am using vs2005 and when the user exports a report to excel there are many extra blank cells and rows, just wondering if there is a way to get rid of these, thanks.

    Hi I will have to look for the article but if I remember correctly you will want to use the grid format set up on the view menu.  This displays the entire report in crystal reports overlayed on a grid.  You will then want to line everything up has much as possible both horizontally and vertically.  You can use the snap to grid feature which will turn the end of the text object red when it is aligned.  I placed ruler markers on both the x and y rulers and tried to line stuff up to those.  Try to get rid of any blank space between the objects placed on the report as the excell dll will turn these into additional cells.  I do not know if crystal reports for .net has this feature but I used version 9 developer edition.

  • Reading formulars and blank cells in Excel by POI event based API

    Hello at all,
    first sorry for my english.
    I have to read Excel files using the POI event based API.
    These files contain FormularRecords, whitch values are Strings.
    I googled a lot, but I didn't found a way, to get FormularRecords as string.
    This I need, because I have to compare the position of the Cell (row, column)
    with other values.
    An other way to get these cells is reading them as StringRecord or SSTRecod.
    But there is no method .getRow() or .getColumn() for StringRecords and SSTRecords.
    My other problem:
    Some cells without a value can not be read.
    Using the BlankRecord didn't catch all of them.
    When I go to these cells and just hit Return (no value is set), then the cells can be catched.
    Can anyone give me an idea?
    It really would be very helpfull.
    And I hope my english can be understood.
    thx a lot
    eichi

    Problem is solved,
    in the datastream the FornulaRecord appears before the StringRecord.
    I take the position from the Formula and value from the String.

  • Import from Excel to Project - blanks cells are having dates automatically added

    Hi. I'm very new to Project but have started setting up a Roadmap using it which is working fairly well so far, although have hit one snag.
    I have data in Excel: it is a list of projects with 4 columns containing the dates of various stages (planning, initiate, execute, close). I have created a reusable map so this can be imported into Project and the Gantt chart to show pre-defined markers
    on the timeline for each stage on each project row. All well and good so far.
    However, not all of the projects in Excel have all of their dates defined. E.g. a project might not yet have a close date. But when this is imported into Project a date gets applied for it. I have no idea why!
    How do i get the import into Project to allow any blank cells from Excel to remain as blank so that nothing is plotted on the Gantt chart for that particular section?

    Thanks for both of your replies. I have tried this and the same issue occurs. I have checked each row in the imported Project data and they are all showing as set to 'manually selected' yet at some point in the import Project is adding data to blank cells.
    I have retried using a simple test excel sheet and when this too is mapped into Project, any blank cells get populated with the date that appeared in the preceding row for some reason:
    I can then go through and manually delete this cell in Project (which then replaces it with an "NA") - but if i have to manually do this whenever importing from Excel into Project then it makes it very time consuming.
    Surely there must be a way for Project to not auto-populate blank cells? Or am i missing something fundamental?

  • Quickly fill in blank cells (Excel equivalent)?

    I often import reports from Quicken into Numbers to create data tables for analysis purposes and find that I must fill in blank cells to ensure I have data consistency across rows.
    While I am confident there is no built in way for Numbers to quickly populate these blank cells, I am asking here if AppleScript has the potential of providing the means. 
    The following link gives insight into how it is done with Excel. Does the AppleScript library provide the tools for something similar?
    http://www.techrepublic.com/blog/microsoft-office/quickly-fill-blank-cells-in-ex cel/
    -DaverDee

    Again SGIII, more than I expected.  Thank you.
    A zero is treated like an empty cell.  It is overwritten with the previous non zero valued cell.
    Lastly, so that I understand what you provided, I inserted comments for each line of code.  Would you please look over my comments to confirm that I get it?
    My problem with learning AppleScript is that while I think I understand the code while reading it, I don't know the AppleScript vocabulary to create the code myself.
    -DaverDee
    Tells…
    —From the selected range, in a table, on a sheet, in a document, within Numbers...
    — Set the variable ‘pv’ to null.
    set pv to ""
    — Begin a loop starting from the initial cell in the selected range.
    — Define ’c’ as value in the current cell.
    repeat with c in cells
    — Copy the value of the current cell to the variable ‘v’.
    set v to c's value
    — If the current cell value stored in the variable 'v' is not zero, then copy the value 'v' to the variable 'pv'.
    if v is not 0 then set pv to v
    — Otherwise, set the cell value defined by 'c' to be the value stored in 'pv'.
    --Note: If nothing has been stored in 'pv', as in the case when 'v' is zero which occurs if zero or null is the first cell value in the selected range, then the cell is populated with a blank.
    else set c's value to pv
    —Close the If.
    end if
    —Close the repeat loop.
    end repeat

  • How to Update a particular cell in Excel with its specific cell Name?

    {color:#000080}Hi,
    I have connected my Java program to Excel using JDBC ODBC connection and also I am able to read/write data to Excel currently.
    In my write code, I have updated the data in particular Excel cells by using conditions in "where" clause.
    Example:
    String $mcode="hello";
    double da1 = Double.parseDouble(txtda1.getText());
    st.executeUpdate("insert into [Sheet4$] values (' " +$mcode+ " ')");
    st.executeUpdate("Update [Sheet4$] set Lot1="+da1+" where Lot1='"+$mcode+"'");
    But I would like to refer to the individual excel cells by their cell name instead of like the above said one.
    In whatever I saw, third party tools were used to refer to the excels cells by their name. But I have to refer to in an ordinary way.
    It would be great if somebody could help me in referring to Excel cells by their name.
    Thanks in advance!{color}

    I don't think it is possible to refer to cell in excel using jdbc, since jdbc is intended to communicate with mostly database in generic way. So you have to use queryStrings to update or retive cell info.
    The only way to access them by cell name is possibly by using some third party tools.

  • Really blank cells...

     I have a strange problem in my excel data. I don't know if I can upload a sample workbook, in the meantime I try to describe the problem.
    In my database I have a column (formatted as text) with many blank cells. The problem is that, for unknown reasons, some of these "blank" cells are not really blank. At the moment, there are 1004 records total (this is not important, it's just
    to use actual figures): if I filter with the regular excel filter (the one on top of the column), selecting all values EXCEPT blanks, I get 374 records selected. If I use the function COUNTA, I get 395 records; if I use the function COUNTBLANK I get 630 records.
    Since 395+630 is 1025 and the records are only 1004, this makes little sense to me: some records are counted twice, once with the blanks and once with the non-blanks. 
    I noticed the problem because the pivot table based on the database and  counting the non-blank records related to that column was giving the wrong results as well (I KNOW that 374 records is correct). Comparing the results of the filtering and of the
    pivot, I was able to isolate the "wrong" records: canceling the cell contents in the column in these records, the pivot table and the functions give the correct results. In those cells there seems to be something, but I don't know what that is:
    1) if I apply the function CODE to one of those cells, I get #VALUE?;
    2) If I apply the function LEN, I get 0 (zero)
    I assume that this means that there is absolutely nothing there.: so what are COUNTA and the pivot table counting?
    I apologize if I am not being clear: this problem is driving me crazy, because the pivot table are the basis of all statistics I need on the database. Thanks in advance for any suggestion
    Robert, Italy

    OK, in the meantime I discovered something else. Let me try to explain. The user of my amateur VBA code can select to add a new entry or to modify an existing entry, via user forms. In the second case, the user form if filled with the contents of the selected
    record fields, the user changes what is needed and the contents of the user form fields are written back to the database. Now, suppose that the field in the database corresponding to the column I mentioned in my post is empty. It is (correctly) NOT counted
    by the pivot table. Now the user changes something else in the form (NOT that field, that remains blank): when the data are written back to the database and the pivot is refreshed, voilà: wrong number, one item more counted. Canceling the field in the database,
    the pivot count is back to normal. 
    What I did was to apply your suggestion to the database field (range of 1 cell only) right after having written it back to the database:
    .Cells(rowno, 24) = Me.TextBox4
    .Cells(rowno, 24) = Application.Clean(.Cells(rowno, 24))
    Unfortunately, it does not work. The pivot table gives the wrong result. BUT the only way I found to "solve" the problem is to clear the cell with clearcontents, equivalent of Cancel in VBA:
    .Cells(rowno, 24) = Me.TextBox4
    If Len(.Cells(rowno, 24)) = 0 Then .Cells(rowno, 24).ClearContents
    This works, but it does not make any sense to me: What am I clearing if there is nothing there? Or what is there is a kind of ghost, of zero length but that is detected by pivot and COUNTA? 
    Add two other mysteries:
    1) the field is counted by COUNTBLANK AND COUNTA: so is it blank or not?
    2) if the user adds a new entry and leaves that field blank, nothing strange happens.
    For the moment, i'll stick with this correction, but not understanding what is going on makes me unconfortable. Thank you for your attention.

  • Crosstab - blank cells

    Hello!
    I want to create a crosstab report that does not have any blank cells when I export to Excel. When I create the crosstab, it automatically does what looks like a group sort. When I export this to excel, there are a lot of blank cells that need to be filled in. How can I make Discoverer fill them in for me, without using a table format? So that when I export to excel, I can create a pivot table from the data?
    Thank you!
    Megan

    Megan,
    I don't know what kind of work you are doing. But, keep in mind that de crosstab in Disco. alerady is a pivot table. So, probably you not need to export the data to Excel.
    Cheers ~
    Eduardo
    null

  • Concatenate with Commas in Non-Blank Cells

    I am concatenating last and first name cells in a pair of long columns.  I do not want to display commas in the non-blank cells when extending the formula down the sheet.  On the web I found a formula which almost works:  =C7&IF(B7="","","
    "&B7) .
    But, I need to put a comma between the last and first names.  So, instead of "Smith Hal" it would read "Smith, Hal".  Please advise.
    PS, An alternative would be to delete the commas from blank cells in the concatenated column from earlier today.  But, Excel does not see them for some reason and will not allow me to replace them with nothing.  Is there a way to do this en masse?
    Thanks.
    Doug in York PA
    Douglas R. Eckert

    I stumbled upon the solution.  Here is my note to myself for future reference.
    COMMAS in CONCATENATE BUT NOT IN BLANK CELLS – FORMULA
    To concatenate a long column of names (last, first) without leaving extra commas in the blanks cells use the following formula: 
    =C7&IF(B7="","",", "&B7) .
    Please close this question.
    Thanks.
    Doug in York PA
    Douglas R. Eckert

  • Fill Blank Cells in Column

    I have a spreadsheet given to me that is a list. Column A is a nominal or catergorical variable (imagine something like "Nationality") and column B is a ratio variable (imagine something like "height").
    Unfortunately not all of the rows have data filled out column A. The issue is identical to the one presented here in MS Excel: http://www.contextures.com/xlDataEntry02.html
    I would like to calculate averages for the subgroups in column A. I could do this manually be selecting each range of data in column B, but with thousands of cells and many subcategories, it would take a long time. From what I can see Numbers "categories" function won't work as I would like if there are blank cells, so it seems I would need to fill in the blank data, to make a proper nominalised database list. Rather than do this manually with manual fills, is there a way to do it programatically? I can't manage the trick for MS Excel in the aforementioned website, as Numbers only allows filtering for blank cells, rather than selecting blank cells.
    I hope someone can help.

    And now, the script :
    --[SCRIPT fillblankcells]
    Enregistrer le script en tant que Script : fillblankcells.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Sélectionner une cellule dans la colonne à compléter.
    menu Scripts > Numbers > fillblankcells
    Si une cellule de la colonne est vide, le script l'alimente avec le contenu de la dernière cellule remplie qui la précéde.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    --=====
    Save the script as a Script: fillblankcells.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Select a cell in the column to fill.
    menu Scripts > Numbers > fillblankcells
    The script will fill every blank cell of this column with the contents of the preceeding filled cell.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2010/04/05
    --=====
    on run
    set {dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName to tell column colNum1
    set maybe to ""
    repeat with r from 2 to count of row
    if not (value of cell r) = 0 then
    set maybe to value of cell r
    else
    set value of cell r to maybe
    end if
    end repeat
    end tell
    end run
    --=====
    on getSelParams()
    local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
    set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
    if r_Name is missing value then
    if my parleAnglais() then
    error "No selected cells"
    else
    error "Il n'y a pas de cellule sélectionnée !"
    end if
    end if
    set two_Names to my decoupe(r_Name, ":")
    set {row_Num1, col_Num1} to my decipher(item 1 of two_Names, d_Name, s_Name, t_Name)
    if item 2 of two_Names = item 1 of two_Names then
    set {row_Num2, col_Num2} to {row_Num1, col_Num1}
    else
    set {row_Num2, col_Num2} to my decipher(item 2 of two_Names, d_Name, s_Name, t_Name)
    end if
    return {d_Name, s_Name, t_Name, r_Name, row_Num1, col_Num1, row_Num2, col_Num2}
    end getSelParams
    --=====
    set {rowNumber, columnNumber} to my decipher(cellRef,docName,sheetName,tableName)
    apply to named row or named column !
    on decipher(n, d, s, t)
    tell application "Numbers" to tell document d to tell sheet s to tell table t to return {address of row of cell n, address of column of cell n}
    end decipher
    --=====
    set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errmsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errmsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errmsg, quote)
    return {theDoc, theSheet, theTable, theRange}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on parleAnglais()
    local z
    try
    tell application "Numbers" to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) lundi 5 avril 2010 14:37:02

  • Fill blank cells in power query from the cell above

    Is it possible in Power Query to fill blank 
    In excel I can choose them by using "go to special" > "blanks" dialogue, and using referrence like "=R-1C"
    Is it possible to fill this blank cells with value of cell above if Import this file in power query? 
    Thank you

    I am using Power Query preview Version: 2.9.3547.162 and there is a 'Fill Down' command in the transform section that does just that. 
    Bertrand

  • Fill in blank cells of a Pivot Table Value field area

    Hi,
    In this workbook (http://1drv.ms/1oHk0QV), a normal Pivot Table has been created on the "Pivot Table" worksheet.  I'd like the blank cells of the Pivot Table to be filled up with the preceding non blank
    value.  So to take an example of Product A, the following is what I want:
    1. H5:N5 should have 1
    2. P5:S5 should have 2
    3. U5:W5 should have 2
    4. Y5:BA5 should have 3
    The same should be done for the others as well.
    I have attempted something on the "PowerPivot" worksheet but I do not get the correct result.
    Please help.
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    there you go:
    YourMeasure:=CALCULATE([State value],
    LASTNONBLANK(FILTER(ALL(Table2[Week]), Table2[Week] <= MAX(Table2[Week])), [State value])
    it basically finds the last week with a valid [State Value] and shows it
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • Pie chart legend showing digit "1" when we set "ignore blank cells"property

    All,
    We have pie chart in Xcelsius 2008 that shows the data with legend value and we have also set the ignore blank cells property to ignore the blank value from column. but once we set this property, it displays the digit "1" in the legend when there is no data.
    we are expecting that nothing should be displayed in pie chart legend when there is no data for the pie chart.
    Thanks,
    Sourabh

    hi Sourabh,
    I could replicate your scenario.
    Workaround is to create a duplicate of this chart. Go to properties of this new chart.
    Go to Appearance ->
    Uncheck
    - Legend
    - Mouse-over values
    - Data Labels
    for this chart.
    Write a logic in excel using 'IF' to verify if your data is empty.
    Use 'Dynamic Visibility' feature to display this chart only when your data is empty.
    Display your original chart if your data is not empty.
    Regards,
    Vamsee

Maybe you are looking for

  • Turn a string that shows hex data in normal format, into a string that shows the same data in hex format

    I have a string of arbitrary length - say, 1AB1C0 - in normal format. I would like to have a function which takes that string in, and outputs the same exact characters, but in hex format. So the input will read 1AB1C0 in normal string format, and the

  • How do I set up an iPad Mini

    I have just bought an iPad Mini for my grand daughter. It says in order to set it up I need OS 10.6 or better. The little card that comes with the iPad says:To start, turn on your iPad mini by pressing and holding the on/off button for a few secondsa

  • Small studio - Colour workflow best practice

    Hi Everyone, Could someone help.. I have a small studio using Adobe Cloud CS6. My work is covers retouching, artworking and digital. My knowledge of a colour workflow is very limited, and in various studios I've worked in have different rules so I'm

  • DF: New feature request NNTP access

    Hi, It would be real good if some (if not all) of the discussion forums were available through a news reader via the NNTP protocol. Reading forums with e.g. Mozilla News would be fast and nice experience. NNTP protocol allows for user authentication,

  • My playlist starts from the end

    Hi, I've burned 9 cd's and they all start from the last song.   I've tried reversing the order but it still plays from the last song.   Any suggestions will be appreciated.   thank you in advance