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

Similar Messages

  • 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

  • Trying to replace a 'default date' with a 'blank cell' (data presentation issue)?

    Hi Everyone,
    I am trying to add the total cost of purchases to a reports that shows 'row level' items and costs. To do this I have used the UNION ALL command, as shown below.
    SELECT
    T1.DocDate
    , T0.Dscription AS 'Item Description'
    , T0.Price
    FROM AU.dbo.POR1 T0
    INNER JOIN AU.dbo.OPOR T1 ON T1.DocEntry = T0.DocEntry
    WHERE T1.DocType = 'S' AND T1.CardCode = 'V010050'
    UNION ALL
    SELECT
    --CASE WHEN CAST(SUM(0) AS varchar) = '1900-01-01 00:00:00.000' THEN 'A' ELSE 'B' END
    , 'Total Cost'
    , SUM(T0.Price)
    FROM AU.dbo.POR1 T0
    INNER JOIN AU.dbo.OPOR T1 ON T1.DocEntry = T0.DocEntry
    WHERE T1.DocType = 'S' AND T1.CardCode = 'V010050'
    I am getting the results that I expect however instead of seeing '1900-01-01 00:00:00.000' in the bottom left hand corner of my result set I would simply like to see a blank cell (with no contents).
    Here is what I am currently seeing -
    How can I 'remove the contents' and substitute a 'blank'? I tried using a case statement and the SUM operator without success. I chose SUM, because to choose a non-aggregate function would require me to use the GROUP BY clause, and doing so would then affect my result set adversely.
    Any suggests here will be greatly appreciated.
    Kind Regards,
    David

    Hi!
    Try This.
    SELECT 
    cast(T1.DocDate as varchar)  'Date'
    , T0.Dscription AS 'Item Description' 
    , T0.Price 
    FROM AU.dbo.POR1 T0 
    INNER JOIN AU.dbo.OPOR T1 ON T1.DocEntry = T0.DocEntry 
    WHERE T1.DocType = 'S' AND T1.CardCode = 'V010050' 
    UNION ALL 
    SELECT 
    --CASE WHEN CAST(SUM(0) AS varchar) = '1900-01-01 00:00:00.000' THEN 'A' ELSE 'B' END 
    ''  'Date'
    , 'Total Cost' 
    , SUM(T0.Price) 
    FROM AU.dbo.POR1 T0 
    INNER JOIN AU.dbo.OPOR T1 ON T1.DocEntry = T0.DocEntry 
    WHERE T1.DocType = 'S' AND T1.CardCode = 'V010050' 
    Regards,

  • Fill in blank cells with a "junk" value

    Greetings
    If I have a table with 20 columns, and some rows that have data in varying numbers of the columns
    Col1 Col2 Col3 etc
    1
    4 4 4
    3 3
    How can I fill in the blank cells with a junk value, say ffff?
    I figure its going to involve the IF and IFBLANK functions, but I'm missing something. Perhaps I need to have it fill in a secondary table, instead of trying it with the "live data" table?
    Thanks!

    If you are trying to do it in the same table you will have to pre-fill all cells with a formula or fill in the blank cells with a formula such as RAND. ISBLANK will not work in this case because you can't have a cell checking itself.
    You could do this in a separate table with a formula such as
    A1=IF(Table 1:: A1 = "", 10*RAND(), Table 1:: A1) and fill this to all the other cells in that table.

  • On my ipod touch, when i go on my game it pops up with a message saying "FlurryAppCircle: Attempting to pass blank hook name to getOffer. Please use a non-blank string for hook name" what does it mean?

    on my ipod touch, when i go on my game it pops up with a message saying "FlurryAppCircle: Attempting to pass blank hook name to getOffer. Please use a non-blank string for hook name" what does it mean?

    Try:
    iOS: Troubleshooting applications purchased from the App Store
    Contact developer/go to their support site.

  • Keep Auto Fill Down A Column With Blank Cells

    Hello,
    I understand if one blank cell is left, auto fill cannot continue through out the rest of the column.
    Is there a way to "trick" the cell into thinking there is information in the blank cell, in order for it to continue to auto-fill? 
    Please help

    You could enter a space in a cell - it will appear to be blank. An apostrophe will work too - this makes the cell contain an empty string value.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Function to replace division by zero error cells with blank cells when calculating a numeric average

    Hi everyone,
    I have a five sheet spreadsheet that uses data from four sheets to calculate numeric averages in the fifth. The problem is that there is not always data in all four sheets which produces a division by zero error in the averages sheet. Is there a function or setting in Numbers 2.3 (not yet ready to upgrade to Numbers 3) that will allow these division by zero cells to be replaced by blank cells.
    I have tried using statements of the form =AVERAGE(IFERROR(Sheet 1::Table 1:: B4,""),IFERROR(Sheet 2:: Table 1:: B4,""),Sheet 3:: Table 1:: B4,""), Sheet 4:: Table 1:: B4,"")). however instead of a division by zero error this produces an error telling me "the function AVERAGE expects that a number, date or duration but found "." ". It looks as though I will have to make about 400 changes to my sheet as these errors are in this and approximately 100 other cells!
    I am hoping that there is some way if possible of correcting these errors without having to manually edit each cell individually.
    Thanks,
    Hugh

    Hugh,
    You may want to consider an intermediate sheet to handle the errors and then pass the result on to the main sheet.
    In the following mockup, I've created a small interposing table the consists of a list of sources in column A and the result from each table. In the example, I perform some operation on those intermediate results, to be passed on to the main table. This may not be a good example, and since I don't know the overall goal of your project it's just a surrogate. (In real life we probably wouldn't be interested in finding the average of averages.)
    The expression in Summary::B2 is:
    =IFERROR(INDIRECT(A&"::B4"), "SourceError")
    Regards,
    Jerry

  • Applescript returns incorrect value with blank cell

    Imagine there is a column of numbers, some which might have the value 0.0 and some which are blank. Imagine wanting to append a data set at the first blank cell using Applescript. As Applescript is currently implemented in Numbers, this is not possible. See the following test.
    1. In Numbers, create a new blank spreadsheet.
    2. Select cell "A1".
    3. Format as text.
    4. Execute the following line of Applescript,
    tell application "Numbers" to get value of cell "A1" of table 1 of sheet 1 of front document
    It returns "0.0".
    I would expect a return "" since it is a empty cell formated as text, no less.
    Because of this, there is no way to find a blank cell since a blank cell returns a value of 0.0 which might be a valid entry.
    Anyone have any ideas for a work around?

    The value of a blank (empty) cell IS zero.
    The value of a cell containing a string whose length is zero contains "".
    Given that, I will post a report because I'm not sure than the value returned in AppleScript is the good choice.
    In AppleWorks for a blank cell, the returned value was "".
    Yvan KOENIG (from FRANCE dimanche 11 janvier 2009 16:31:35)
    +Your tracking number for this issue is Bug ID# 6487875.+
    Hello
    +(1) May I know if the fact than+
    +set v to value of cell "B12"+
    +returns 0.0 when the cell is blank is the designed result.+
    +In AppleWorks in this case, we are accustomed to get an empty string.+
    +(2) In version 1, a cell containing an empty string was accepted in an arithmetic operation.+
    +In version 2, it is rejected.+
    +Is it a design choice or is it a bug ?+
    +Your tracking number for this issue is Bug ID# 6487879.+
    Hello
    +In Numbers, as long as we are referencing cells of the current row (200 for instance), we may use short references like:+
    =(BC)*(DE)
    +When we save as iWork '08 document, the formula is expanded as+
    =(B200C200)*(D200E200)
    +Is it a design choice or a bug ?+

  • 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.

  • 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

  • Using Excel 14.3.7 to create a text file, for saving as a .csv file. Problems with commas.

    I have created a text file in Excel, to be saved as a .csv file and uploaded to an online database. The file is rejected. When I open it in textedit I can see that the empty cells ( of which there are several in each row, all in the same columns) contain commas. It looked to me as though this could be the result of tabbing across empty cells. So I created a dummy file with a couple of lines where I tabbed across the whole row including the empty cells, and a couple of lines where I clicked in each individual cell in which I wanted to enter text. Opened in textedit there is no difference between the two type of entry. What can I do to stop Excel or .csv format entering commas in blank cells? Suggestions in simple English appreciated.

    http://answers.microsoft.com/en-us/mac/forum/macexcel?tab=QnA

  • Filtering by 'Blank' and 'Non Blank'

    Numbers looks better but the lack of this simple function is driving me crazy.
    In Excell, I could quickly sort a column by 'blank' 'non-blank' or a whatever else is in the pulldown (like a name) - and then get a count of those cells with that criteria.
    How do I quickly do this in Numbers?? I know I can set criteria but I then need to know what's in a cell ahead of time.
    I use spreadsheets to track projects and need to be able to quickly sort the fields while on a call - using Numbers for this is not working.

    In Numbers, you can quickly hide rows that are blank or non-blank and then do the sort.
    Click in the column you want to sort. On the the toolbar is a button called "reorganize", click it. It has three parts. The first is sorting. The second is filters. The third has to do with categories. In the filter section, select a column and it will let you choose filters such as blank, not blank, contains, etc. The rows that don't meet your criteria will be hidden and you can sort the remaining rows as ascending or descending if you want.
    A count of the items that meet your criteria is not available as far as I know.
    The Pages 09 users manual provides more detail than what I've provided above. The section on sorting begins on page 63.

  • Hiding the blank cells in Webi report - BO 4.0

    Hi,
    I have created a webi report in which i have used different types of blocks
    1) Form table
    2) Verticle table
    3) Horizontal table.
    so now in real time there chances that some of the blocks will not have any data.(i.e it displays blank cell) in the report.
    so now i have to hide only the blank cells and not the table headers.that means though the cells are blank i have to display headers.
    what formatting changes i need to achieve this in Webi Report.
    If anybody does this please let me know the step by step logic in detail.
    Thanks in advance.
    Regards,
    Naga Nanda Kishore.

    Hi,
    We cannot hide specifc cells in WebI, however we can choose to whether to display or not empty measure values and empty dimension value.
    So you need to select the desired block-> Right Click  and Select Format Table-> Uncheck Show rows with empty dimension values or Show rows with empty measure values whichever is required to be hidden.
    Hope this helps.
    Regards,
    Manpreet

  • How to Avoid Errors in Max Function When Data Contains Blank Cells

    I have a column with duration values. However, it also contains some blank cells. These "blank cells" have formulas in them, but as the cells they reference too are blank the formula doesn't produce a result.>/p>
    I want to get the max value from this column. When I simply do =MAX(column-name) I get an error, presumably because some of the cells are blank. This table is going to be highly dynamic, so I don't want to limit the range of the MAX() function to only those cells with values.
    So does anyone know a solution for this, please? If I was some how able to create a formula which returned the range of cells with actual values, then I could use that in the MAX() function. Or, if I could somehow tell the MAX() function to ignore blank cells, but I'm not sure either of these are possible.
    Thanks,
    Nic

    I don't see a problem with "blank" (null string) cells mixed with duration cells.  MAX works fine with this mix of cells. But if the "blank" cells are numbers, not text, that gives an error.
    A formula always produces a result. A formula cannot result in a blank cell. The closest you can get to "blank" is a null string (the result of two quotes next to each other with nothing between them) . So the question is, what is the result that you are calling "blank"?

  • 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

Maybe you are looking for

  • Open dialog box on second monitor?

    Hi there, I use CS6 on a system that utilises two monitors. To maximise the amount of screen on Monitor 1 used for viewing my photos, I have arranged the workspace so that my history, actions and other panels are on Monitor 2. However, whenever I ope

  • Spaces and Spotlight issues after wakeup

    Hi, when ever I wakeup my macbook pro 13" running 10.6.8 I have 2 issues: 1)  the spaces grid freezes on the screen. I can still navigate via apple key + arrow keys, but the grid wont dissappear until... 2) I fidgit with spotlight. It wont respond vi

  • Booklet printing problem

    I have a booklet set up on half-letter sized pages that I want to make into an imposed PDF. In the Print Booklet preview, it looks correct. But when I make the PDF, the pages appear half the size that they should. I see two tiny pages on a letter-siz

  • GG Replicaation Issues

    Hi All, In GG I have source side 10 columns and target 3 columns when i try to update source side EXCEPT theses 3 columns like other columns target side no changes but timestamp will get change i don't want this changes on target side. I need when th

  • Solution Allowing Customers to Pause/Cancel Recurring Orders

    Hi, We've created an eCommerce website for a client, using Business Catalyst, which features recurring payments. The client is asking whether it's possible for their customers to be able to log into their account on the website and pause/cancel recur