![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com