billyheanue
Board Regular
- Joined
- Jul 13, 2015
- Messages
- 109
Hi all;
"Vlookprint" is the cell where the first vlookup formula will fall into. this first cell is necessary to establish because it gets resized to the correct amount of cells to do Vlookups in.
I have a cell in sheet one that contains literally, "W36". So, cell T16 = "W36". The value in cell T16 varies.
How do I store the contents of cell T16 as a variable called "vlookprint" so that the result:
vlookprint.Resize(resizeval,1).Formula....
is the same as
range("W36").resize(resizeval,1).Formula....
Heres what I have written for more reference:
Thank you Everyone!
"Vlookprint" is the cell where the first vlookup formula will fall into. this first cell is necessary to establish because it gets resized to the correct amount of cells to do Vlookups in.
I have a cell in sheet one that contains literally, "W36". So, cell T16 = "W36". The value in cell T16 varies.
How do I store the contents of cell T16 as a variable called "vlookprint" so that the result:
vlookprint.Resize(resizeval,1).Formula....
is the same as
range("W36").resize(resizeval,1).Formula....
Heres what I have written for more reference:
Code:
Dim resizevalu As DoubleDim colindexvalu As Double
Dim vlookprint As Range '?????
vlookprint = Sheet1.Cells(16, 20).Value '?????? I dont know what to DIM vlookprint as...a Range?
resizevalu = Sheet1.Cells(19, 12).Value
colindexvalu = Sheet1.Cells(16, 12).Value
vlookprint.Resize(resizeval, 1).Formula = "=VLOOKUP(Sheet1!B16,Sheet2!" _ 'vlookprint is what I want to edit!!
& Sheets("Sheet2").Range("A12").CurrentRegion.Address & ",Sheet1!G$13,FALSE)"
Thank you Everyone!