Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I would like to fill cells with X, if they don't already have a letter in
them. I started to use the IF function, but am confused by how I should treat the 'if false' argument. Some cells already have a C, or an R, and I don't want to override the existing text. =IF(" ","x",) Should I be using a different function? Pity conditional formatting can't return text |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On the face of it, you could try in B1, copied down:
=IF(TRIM(A1)="","X",TRIM(A1)) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Twishlist" wrote: I would like to fill cells with X, if they don't already have a letter in them. I started to use the IF function, but am confused by how I should treat the 'if false' argument. Some cells already have a C, or an R, and I don't want to override the existing text. =IF(" ","x",) Should I be using a different function? Pity conditional formatting can't return text |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for your response Mac, but when I tried it, I got a FALSE result. I
tried the find/replace option as suggested by OssieMac and it worked beautifully for this purpose. "Max" wrote: On the face of it, you could try in B1, copied down: =IF(TRIM(A1)="","X",TRIM(A1)) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Twishlist" wrote: I would like to fill cells with X, if they don't already have a letter in them. I started to use the IF function, but am confused by how I should treat the 'if false' argument. Some cells already have a C, or an R, and I don't want to override the existing text. =IF(" ","x",) Should I be using a different function? Pity conditional formatting can't return text |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
No prob. Happy to hear you got what you wanted.
-- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Twishlist" wrote in message ... Thanks for your response Max, but when I tried it, I got a FALSE result. I tried the find/replace option as suggested by OssieMac and it worked beautifully for this purpose. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not sure that I have interpreted your question correctly. =IF(" ","x",) Does
this mean if there is a space in the cell or is nothing in the cell? Anyway, Dave Petersen had an answer a few days ago for a different reason but referring to using the replace command whereby you can actually replace nothing with something by simply leaving the Find what blank. However, if it is a space then you can also replace that with something by typing a space in the Find what field but ensure that you set the option to Match entire cell contents. Make sure that you back up your workbook before you attempt the above. When testing the method I found that it would only work with the actual used area of a worksheet. If you select a blank range on a new worksheet then the find nothing failed. If you insert a character in the last cell of the area to be selected then it worked. (Only tested with xl2007.) -- Regards, OssieMac "Twishlist" wrote: I would like to fill cells with X, if they don't already have a letter in them. I started to use the IF function, but am confused by how I should treat the 'if false' argument. Some cells already have a C, or an R, and I don't want to override the existing text. =IF(" ","x",) Should I be using a different function? Pity conditional formatting can't return text |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
No I didn't have a space in the cell, just empty of content. Tried the
find/replace option and it worked perfectly for this purpose...don't know why I didn't think of it. Thank goodness for this Discussion Group for dulled minds like mine. Thanks heaps. "OssieMac" wrote: Not sure that I have interpreted your question correctly. =IF(" ","x",) Does this mean if there is a space in the cell or is nothing in the cell? Anyway, Dave Petersen had an answer a few days ago for a different reason but referring to using the replace command whereby you can actually replace nothing with something by simply leaving the Find what blank. However, if it is a space then you can also replace that with something by typing a space in the Find what field but ensure that you set the option to Match entire cell contents. Make sure that you back up your workbook before you attempt the above. When testing the method I found that it would only work with the actual used area of a worksheet. If you select a blank range on a new worksheet then the find nothing failed. If you insert a character in the last cell of the area to be selected then it worked. (Only tested with xl2007.) -- Regards, OssieMac "Twishlist" wrote: I would like to fill cells with X, if they don't already have a letter in them. I started to use the IF function, but am confused by how I should treat the 'if false' argument. Some cells already have a C, or an R, and I don't want to override the existing text. =IF(" ","x",) Should I be using a different function? Pity conditional formatting can't return text |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function argument not returning a value | Excel Worksheet Functions | |||
How can I get around 30 argument limit of SUM function? | Excel Worksheet Functions | |||
FALSE argument in VLOOKUP | Excel Worksheet Functions | |||
VBA function for "Mean" using Array as argument | Excel Worksheet Functions | |||
Need Function Argument | Excel Worksheet Functions |