Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text in Formula
Hi,
Having problem getting text into formula: Need to have the following formula in cell(1): =if(b1="B", "", "Match") The following code does not work: Cells(1).formula= "=if(" & Cells(2).address & "=" & ""B"" & "," & """" & "," & ""Match"" & ")" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text in Formula
Hi
"=if(" & Cells(2).Address & "=B,"""",""Match"")" -- HTH. Best wishes Harald Followup to newsgroup only please "Tony Di Stasi" skrev i melding ... Hi, Having problem getting text into formula: Need to have the following formula in cell(1): =if(b1="B", "", "Match") The following code does not work: Cells(1).formula= "=if(" & Cells(2).address & "=" & ""B"" & "," & """" & "," & ""Match"" & ")" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text in Formula
"Tony Di Stasi" wrote...
... Need to have the following formula in cell(1): =if(b1="B", "", "Match") The following code does not work: Cells(1).formula= "=if(" & Cells(2).address & "=" & ""B"" & _ "," & """" & "," & ""Match"" & ")" A few things. If you want B1 rather than $B$1, add some parameters to that Address call - Cells(2).Address(0, 0). Aside from that, you're not doubling your embedded double quotes. To get "" as a result, you need to start with """""" rather than """". So try Cells(1).Formula= "=IF(" & Cells(2).Address(0, 0) & "=" & """B""" & _ "," & """""" & "," & """Match""" & ")" -- Never attach files. Snip unnecessary quoted text. Never multipost (though crossposting is usually OK). Don't change subject lines because it corrupts Google newsgroup archives. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested formula to search a text string and return specific text | Excel Worksheet Functions | |||
Formula Text String: Formatting Text and Numbers? | Excel Discussion (Misc queries) | |||
Excel:Get concatenated text to be recognised as formula not text? | Excel Discussion (Misc queries) | |||
Formula to count text and alert me if a text appears more than twi | Excel Discussion (Misc queries) | |||
match cell text with text in formula | Excel Worksheet Functions |