Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 and VB Macro
I'm trying to insert an Excel IF formula into cells where the logical test is
based on employee names. If the name is found, it returns the employee's hourly rate, if not zero. Here is what I've done: Do Until IsEmpty(ActiveCell.Offset(0, -11)) ActiveCell.FormulaR1C1 = "=IF(+RC[-5]="Smith, Joe",11,0)" ActiveCell.Offset(1, 0).Select Loop The problem is too many "s. I need to include the formula in "" and the string in "", but VB expects the first " of the string to be the end of the argument. How can I handle this? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 and VB Macro
ActiveCell.FormulaR1C1 = "=IF(RC[-5]= ""Smith, Joe"" ,11,0)"
-- Vasant "adavisRSC" wrote in message ... I'm trying to insert an Excel IF formula into cells where the logical test is based on employee names. If the name is found, it returns the employee's hourly rate, if not zero. Here is what I've done: Do Until IsEmpty(ActiveCell.Offset(0, -11)) ActiveCell.FormulaR1C1 = "=IF(+RC[-5]="Smith, Joe",11,0)" ActiveCell.Offset(1, 0).Select Loop The problem is too many "s. I need to include the formula in "" and the string in "", but VB expects the first " of the string to be the end of the argument. How can I handle this? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help for Excel 2002 | Excel Discussion (Misc queries) | |||
excel 2002 macro | Excel Worksheet Functions | |||
Macro not working in Excel 2002 | Excel Programming | |||
Excel 2002 Macro to Execute SQL Statement | Excel Programming | |||
Excel 2002 - Macro Security | Excel Programming |