Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell2000 Macro 1

Status
Not open for further replies.

rlindey

Technical User
Jul 18, 2001
1
US
i WANT TO ADD A SECTION TO A PREEXISITNG MACR THAT WILL ADD THE FORMULA "IF(ISBLANK(A8),"", "STRING"".
I HAVE TRIED VARIOUS ENTRIES SIMILAR "ActiveCell.FormulaR1C1 = _ "IF(ISBLANK(RC[-7],"","TEXT")"
WHEN I PRESS ENTER TO ADD ANOTHEROROWS Ii KEEP GETTING AN ERROR MESSAGES.
HOW DO I ENTER THE CORRECT COMMAND?

BOB

 
Your problem lies in the quotation marks. They are seen as the start/end of a string instead part of your string variable. Your best bet would be to put the string into a varaible first.
Code:
Dim sEqn As String

sEqn = "=IF(ISBLANK(RC[-7]," & _        
       Chr(34) & Chr(34) & "," & _
       Chr(34) & "TEXT" & Chr(34) & ")"

ActiveCell.FormulaR1C1 = sEqn

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top