Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am doing an if then statement. I want to check if a cell has a
certain contents, but the text in the cell is on 2 seperate lines and so the IF statement returns fales and does not clear the cell. I export a file to excel and then run the macro to update it. I don't want the contents of the cells to be cleared unless it is this text that is on 2 lines. The slash in the code is where a paragraph should be. This is what I have If ActiveCell.FormulaR1C1 = "Account Title/Account Name" Then ActiveCell.FormulaR1C1 = "" Range("F" & MyRow & ":F" & MyRow).Select ActiveCell.FormulaR1C1 = "" Else End If Thanks for the help! Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use
"Account Title" & Chr(10) & "Account Name" -- HTH RP (remove nothere from the email address if mailing direct) "dm16s" wrote in message oups.com... I am doing an if then statement. I want to check if a cell has a certain contents, but the text in the cell is on 2 seperate lines and so the IF statement returns fales and does not clear the cell. I export a file to excel and then run the macro to update it. I don't want the contents of the cells to be cleared unless it is this text that is on 2 lines. The slash in the code is where a paragraph should be. This is what I have If ActiveCell.FormulaR1C1 = "Account Title/Account Name" Then ActiveCell.FormulaR1C1 = "" Range("F" & MyRow & ":F" & MyRow).Select ActiveCell.FormulaR1C1 = "" Else End If Thanks for the help! Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for detect palindromes and repeats in letters/numbers string | Excel Worksheet Functions | |||
Macro for detect palindromes and repeats in letters/numbers string | New Users to Excel | |||
Can't see all of the paragraph text in the cell. | Excel Discussion (Misc queries) | |||
Starting a new paragraph within a cell | Excel Discussion (Misc queries) | |||
Qn: Paragraph or LF in ONE Cell?? | Excel Programming |