Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cannot record macro
Hello i am trying to record a macro with the recorder but i get a "cannot
record macro" error message. the formula i am trying to record is (this is the way it looks in excel mode) : IF(OR(E2="11 - MARKETING XXXXXXXX";E2="12 - MARKETING XXXXXXXXXX";E2="13 - INTERNATIONAL MARKETING";E2="14- XXXXXXXXXXXXX");VLOOKUP(H2;'[MARKETNGHELP.xls]vlookup'!$P:$Q;2;FALSE);VLOOKUP(E2;'[MARKEINGHELP.xls]vlookup'!$I:$J;2;FALSE)) why can't i record it? can someone give me the code to paste it directly in a module? thank you. Steven. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cannot record macro
You, and therefore I, am a little confused. You don't record formulas, you
only record macros. It seems like you have the formula you want (except that all the semicolons should be commas), so what's to record? Or are you trying to translate the formula into VBA code? Maybe you should look at Application.WorksheetFunction. -- --Andy Smith "steven" wrote: Hello i am trying to record a macro with the recorder but i get a "cannot record macro" error message. the formula i am trying to record is (this is the way it looks in excel mode) : IF(OR(E2="11 - MARKETING XXXXXXXX";E2="12 - MARKETING XXXXXXXXXX";E2="13 - INTERNATIONAL MARKETING";E2="14- XXXXXXXXXXXXX");VLOOKUP(H2;'[MARKETNGHELP.xls]vlookup'!$P:$Q;2;FALSE);VLOOKUP(E2;'[MARKEINGHELP.xls]vlookup'!$I:$J;2;FALSE)) why can't i record it? can someone give me the code to paste it directly in a module? thank you. Steven. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cannot record macro
Sub ABC()
Dim s1 as String, s2 as String s1 = "=IF(OR(E2=""11 - MARKETING XXXXXXXX"";E2" & _ "=""12 - MARKETING XXXXXXXXXX"";E2" & _ "=""13 - INTERNATIONAL MARKETING"";E2" & _ "=""14- XXXXXXXXXXXXX"");VLOOKUP(H2;" & _ "'[MARKETNGHELP.xls]vlookup'!$P:$Q;2;FALSE);" & _ "VLOOKUP(E2;'[MARKEINGHELP.xls]vlookup'!$I:$J;2;FALSE))" s2 = Application.Replace(s1,";",",") activecell.formula = s2 End sub when using the formula property, the formula is entered using us English conventions. -- Regards, Tom Ogilvy "steven" wrote: Hello i am trying to record a macro with the recorder but i get a "cannot record macro" error message. the formula i am trying to record is (this is the way it looks in excel mode) : IF(OR(E2="11 - MARKETING XXXXXXXX";E2="12 - MARKETING XXXXXXXXXX";E2="13 - INTERNATIONAL MARKETING";E2="14- XXXXXXXXXXXXX");VLOOKUP(H2;'[MARKETNGHELP.xls]vlookup'!$P:$Q;2;FALSE);VLOOKUP(E2;'[MARKEINGHELP.xls]vlookup'!$I:$J;2;FALSE)) why can't i record it? can someone give me the code to paste it directly in a module? thank you. Steven. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Record Macro and Edit Macro options disabled | New Users to Excel | |||
i need to record a macro to.... | Excel Programming | |||
how to record new macro using vba | Excel Programming | |||
Record Macro - Record custom user actions | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming |