Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Record Macro and Edit Macro options disabled Huzza New Users to Excel 1 March 18th 09 03:55 PM
i need to record a macro to.... tinkerbellsmyhoe Excel Programming 10 April 24th 06 08:05 PM
how to record new macro using vba bhavin vyas Excel Programming 0 February 16th 06 06:54 AM
Record Macro - Record custom user actions Sal[_4_] Excel Programming 1 December 23rd 04 03:18 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"