Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
fabulousk
 
Posts: n/a
Default Macros not performing correctly

I recorded a macro to place a vlookup formula in four cells that are side by
side. When I run the macro it only performs the first task, it does not go on
to do the other three. I used the tab key to go to the next cell while
recording the macro, I don't know if that's why it's not working or if it's
something else.
The script looks like this:
Sub EERates()
'
' EERates Macro
' Macro recorded 3/4/2005 by BCBSOK
'

'
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Sheet1!R3C1:R102C2,2,0)"
Range("F15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Sheet1!R3C4:R102C5,2,0)"
Range("G15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Sheet1!R3C7:R102C8,2,0)"
Range("H15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Sheet1!R3C10:R102C11,2,0)"
Range("E16").Select
End Sub



Any help would be appreciated!

Thanks!
  #2   Report Post  
CLR
 
Posts: n/a
Default

If you intended to be using a single range to function with all of the
VLOOKUP formulas, you did not get that.......you evidently entered your
lookup range as "relative referenced" cells, rather than "absolute
referenced" cells, or better yet, a RangeName.........try something like:

=VLOOKUP(D13,$A$3:0$B$102,2,0)

Vaya con Dios,
Chuck,CABGx3




"fabulousk" wrote in message
...
I recorded a macro to place a vlookup formula in four cells that are side

by
side. When I run the macro it only performs the first task, it does not go

on
to do the other three. I used the tab key to go to the next cell while
recording the macro, I don't know if that's why it's not working or if

it's
something else.
The script looks like this:
Sub EERates()
'
' EERates Macro
' Macro recorded 3/4/2005 by BCBSOK
'

'
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Sheet1!R3C1:R102C2,2,0)"
Range("F15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Sheet1!R3C4:R102C5,2,0)"
Range("G15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Sheet1!R3C7:R102C8,2,0)"
Range("H15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Sheet1!R3C10:R102C11,2,0)"
Range("E16").Select
End Sub



Any help would be appreciated!

Thanks!



  #3   Report Post  
fabulousk
 
Posts: n/a
Default

My Vlookup formula is performing correctly.
I believe the problem lies in turning the relative reference button off/on.
At home, in a newer version of Excel, it gave me a relative reference button
and my formula worked. At work, I do not get a relative reference button and
it's not working.
How do I get the relative reference button? I'm using Excel 2000 at work,
maybe it does not have such a button?

"CLR" wrote:

If you intended to be using a single range to function with all of the
VLOOKUP formulas, you did not get that.......you evidently entered your
lookup range as "relative referenced" cells, rather than "absolute
referenced" cells, or better yet, a RangeName.........try something like:

=VLOOKUP(D13,$A$3:0$B$102,2,0)

Vaya con Dios,
Chuck,CABGx3




"fabulousk" wrote in message
...
I recorded a macro to place a vlookup formula in four cells that are side

by
side. When I run the macro it only performs the first task, it does not go

on
to do the other three. I used the tab key to go to the next cell while
recording the macro, I don't know if that's why it's not working or if

it's
something else.
The script looks like this:
Sub EERates()
'
' EERates Macro
' Macro recorded 3/4/2005 by BCBSOK
'

'
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Sheet1!R3C1:R102C2,2,0)"
Range("F15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Sheet1!R3C4:R102C5,2,0)"
Range("G15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Sheet1!R3C7:R102C8,2,0)"
Range("H15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Sheet1!R3C10:R102C11,2,0)"
Range("E16").Select
End Sub



Any help would be appreciated!

Thanks!




  #4   Report Post  
fabulousk
 
Posts: n/a
Default

I found it on another post. It has to do with the stop recording toolbar.
Yeah! It's working now.

"fabulousk" wrote:

My Vlookup formula is performing correctly.
I believe the problem lies in turning the relative reference button off/on.
At home, in a newer version of Excel, it gave me a relative reference button
and my formula worked. At work, I do not get a relative reference button and
it's not working.
How do I get the relative reference button? I'm using Excel 2000 at work,
maybe it does not have such a button?

"CLR" wrote:

If you intended to be using a single range to function with all of the
VLOOKUP formulas, you did not get that.......you evidently entered your
lookup range as "relative referenced" cells, rather than "absolute
referenced" cells, or better yet, a RangeName.........try something like:

=VLOOKUP(D13,$A$3:0$B$102,2,0)

Vaya con Dios,
Chuck,CABGx3




"fabulousk" wrote in message
...
I recorded a macro to place a vlookup formula in four cells that are side

by
side. When I run the macro it only performs the first task, it does not go

on
to do the other three. I used the tab key to go to the next cell while
recording the macro, I don't know if that's why it's not working or if

it's
something else.
The script looks like this:
Sub EERates()
'
' EERates Macro
' Macro recorded 3/4/2005 by BCBSOK
'

'
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Sheet1!R3C1:R102C2,2,0)"
Range("F15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Sheet1!R3C4:R102C5,2,0)"
Range("G15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Sheet1!R3C7:R102C8,2,0)"
Range("H15").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Sheet1!R3C10:R102C11,2,0)"
Range("E16").Select
End Sub



Any help would be appreciated!

Thanks!




  #5   Report Post  
CLR
 
Posts: n/a
Default

Glad to hear all is well..............thanks for the feedback

Vaya con Dios,
Chuck, CABGx3



"fabulousk" wrote in message
...
I found it on another post. It has to do with the stop recording toolbar.
Yeah! It's working now.

"fabulousk" wrote:

My Vlookup formula is performing correctly.
I believe the problem lies in turning the relative reference button

off/on.
At home, in a newer version of Excel, it gave me a relative reference

button
and my formula worked. At work, I do not get a relative reference button

and
it's not working.
How do I get the relative reference button? I'm using Excel 2000 at

work,
maybe it does not have such a button?

"CLR" wrote:

If you intended to be using a single range to function with all of the
VLOOKUP formulas, you did not get that.......you evidently entered

your
lookup range as "relative referenced" cells, rather than "absolute
referenced" cells, or better yet, a RangeName.........try something

like:

=VLOOKUP(D13,$A$3:0$B$102,2,0)

Vaya con Dios,
Chuck,CABGx3




"fabulousk" wrote in message
...
I recorded a macro to place a vlookup formula in four cells that are

side
by
side. When I run the macro it only performs the first task, it does

not go
on
to do the other three. I used the tab key to go to the next cell

while
recording the macro, I don't know if that's why it's not working or

if
it's
something else.
The script looks like this:
Sub EERates()
'
' EERates Macro
' Macro recorded 3/4/2005 by BCBSOK
'

'
ActiveCell.FormulaR1C1 =

"=VLOOKUP(RC[-2],Sheet1!R3C1:R102C2,2,0)"
Range("F15").Select
ActiveCell.FormulaR1C1 =

"=VLOOKUP(RC[-3],Sheet1!R3C4:R102C5,2,0)"
Range("G15").Select
ActiveCell.FormulaR1C1 =

"=VLOOKUP(RC[-4],Sheet1!R3C7:R102C8,2,0)"
Range("H15").Select
ActiveCell.FormulaR1C1 =

"=VLOOKUP(RC[-5],Sheet1!R3C10:R102C11,2,0)"
Range("E16").Select
End Sub



Any help would be appreciated!

Thanks!





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
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
sorting with macros Sorting in macros Excel Discussion (Misc queries) 1 February 1st 05 09:02 AM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
The available macros list in XL; how to suppress filename from showing KR Excel Discussion (Misc queries) 1 January 10th 05 07:20 PM
Macros disappear after a file is imported Brent E Excel Discussion (Misc queries) 1 December 18th 04 12:25 AM


All times are GMT +1. The time now is 05: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"