Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default VBA Formula Question

I have the following

ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC7,WorksheetPivot!R3:R7,MATCH(R1C,Works heetPivot!R2),FALSE)"

I want to change R7 to be variable based on the number of rows in the
worksheet. I have a value for that which I'll call "lrow". What do I need
to do to change the R3:R7 to R3:R &lrow?

Thanks,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default VBA Formula Question

Hi Barb,

"=VLOOKUP(RC7,WorksheetPivot!R3:R" & lrow &
",MATCH(R1C,WorksheetPivot!R2),FALSE)"

--
Kind regards,

Niek Otten

"Barb Reinhardt" wrote in message
...
I have the following

ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC7,WorksheetPivot!R3:R7,MATCH(R1C,Works heetPivot!R2),FALSE)"

I want to change R7 to be variable based on the number of rows in the
worksheet. I have a value for that which I'll call "lrow". What do I
need
to do to change the R3:R7 to R3:R &lrow?

Thanks,
Barb Reinhardt



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default VBA Formula Question

Without the linebreak of course

--
Kind regards,

Niek Otten

"Niek Otten" wrote in message
...
Hi Barb,

"=VLOOKUP(RC7,WorksheetPivot!R3:R" & lrow &
",MATCH(R1C,WorksheetPivot!R2),FALSE)"

--
Kind regards,

Niek Otten

"Barb Reinhardt" wrote in
message ...
I have the following

ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC7,WorksheetPivot!R3:R7,MATCH(R1C,Works heetPivot!R2),FALSE)"

I want to change R7 to be variable based on the number of rows in the
worksheet. I have a value for that which I'll call "lrow". What do I
need
to do to change the R3:R7 to R3:R &lrow?

Thanks,
Barb Reinhardt





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default VBA Formula Question

Thanks, I'll try that. I wasn't sure if I could do it that way.

"Niek Otten" wrote:

Hi Barb,

"=VLOOKUP(RC7,WorksheetPivot!R3:R" & lrow &
",MATCH(R1C,WorksheetPivot!R2),FALSE)"

--
Kind regards,

Niek Otten

"Barb Reinhardt" wrote in message
...
I have the following

ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC7,WorksheetPivot!R3:R7,MATCH(R1C,Works heetPivot!R2),FALSE)"

I want to change R7 to be variable based on the number of rows in the
worksheet. I have a value for that which I'll call "lrow". What do I
need
to do to change the R3:R7 to R3:R &lrow?

Thanks,
Barb Reinhardt




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
Newbie Formula Question - how to get formula to repeat in each subsequent row? [email protected] New Users to Excel 2 January 10th 10 05:02 PM
Formula Question TLC Excel Discussion (Misc queries) 4 August 19th 09 02:46 AM
Formula Question Johnnie[_2_] Excel Discussion (Misc queries) 3 February 8th 08 10:43 PM
Formula question bgrearick Excel Discussion (Misc queries) 1 December 31st 06 09:24 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM


All times are GMT +1. The time now is 03:38 PM.

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"