Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default macro recorder and formulas

I just recorded a macro for which one of the steps is a rather complicated
ISNUMBER/MATCH function:

ActiveCell.FormulaR1C1 = _
"=IF(AND(ISNUMBER(MATCH(LEFT(RC[-18],3),'[ELR expense account
identification.xls]Sheet1'!R2C1:R12C1,0)),ISNUMBER(MATCH(RC[-17],'[Frank''s
expense codes--GDCS and
non-GDCS.xls]Sheet1'!R2C1:R39C1,0))),""Extract"","""")"

Two questions:
1) How do I get the macro to always insert this formula into cell T2?
2) Why does the macro recorder record in R1C1 format? Is it possible to get
it to record in regular A1 format?

Thanks,

Dave
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default macro recorder and formulas

Dave,

1. This is going to put the formula in the activecell, so to make
sure the activecell is T2 have a line before it:

Range("T2").Select

2. The macro recorder always seems to use R1C1 format - I don't know
if there is a setting to change this, but you can always edit the
formula after recording the macro.

Hope this helps.

Pete


On Mar 19, 2:27 pm, Dave F wrote:
I just recorded a macro for which one of the steps is a rather complicated
ISNUMBER/MATCH function:

ActiveCell.FormulaR1C1 = _
"=IF(AND(ISNUMBER(MATCH(LEFT(RC[-18],3),'[ELR expense account
identification.xls]Sheet1'!R2C1:R12C1,0)),ISNUMBER(MATCH(RC[-17],'[Frank''s
expense codes--GDCS and
non-GDCS.xls]Sheet1'!R2C1:R39C1,0))),""Extract"","""")"

Two questions:
1) How do I get the macro to always insert this formula into cell T2?
2) Why does the macro recorder record in R1C1 format? Is it possible to get
it to record in regular A1 format?

Thanks,

Dave



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default macro recorder and formulas

Thanks, just figured 1 out, and as for number 2 I suppose it doesn't matter
as long as I know the formula works in A1 format.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Pete_UK" wrote:

Dave,

1. This is going to put the formula in the activecell, so to make
sure the activecell is T2 have a line before it:

Range("T2").Select

2. The macro recorder always seems to use R1C1 format - I don't know
if there is a setting to change this, but you can always edit the
formula after recording the macro.

Hope this helps.

Pete


On Mar 19, 2:27 pm, Dave F wrote:
I just recorded a macro for which one of the steps is a rather complicated
ISNUMBER/MATCH function:

ActiveCell.FormulaR1C1 = _
"=IF(AND(ISNUMBER(MATCH(LEFT(RC[-18],3),'[ELR expense account
identification.xls]Sheet1'!R2C1:R12C1,0)),ISNUMBER(MATCH(RC[-17],'[Frank''s
expense codes--GDCS and
non-GDCS.xls]Sheet1'!R2C1:R39C1,0))),""Extract"","""")"

Two questions:
1) How do I get the macro to always insert this formula into cell T2?
2) Why does the macro recorder record in R1C1 format? Is it possible to get
it to record in regular A1 format?

Thanks,

Dave




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
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro recorder Fossil_Rock Excel Discussion (Misc queries) 1 July 30th 05 08:10 PM
Macro Recorder-Relative relation ChasX Excel Discussion (Misc queries) 3 June 28th 05 12:51 AM
Change result of Macro Recorder Jim May Excel Discussion (Misc queries) 3 May 21st 05 01:58 PM


All times are GMT +1. The time now is 06:10 AM.

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

About Us

"It's about Microsoft Excel"