Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Every month I receive a new worksheet with that month's data. I have a master
sheet that I use to pull the data from this new worksheet. However, I have to go through all of the vlookup formula and change the referenced worksheet name. Is there a way to change the formula, so that it references a cell (A1) with the worksheet name? Example: =VLOOKUP(J$3,Q109!$U$6:$GM$20,$C12,FALSE) This is the formula everything is hooked up to, i.e. Q109 worksheet I then have to go through each formula and change it to Q209 worksheet. =VLOOKUP(J$3,Q209!$U$6:$GM$20,$C12,FALSE) Can I just have it reference a particular cell and when I change the name in the cell, all of the formula change which worksheet they reference? Thanks for you help! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can use the Indirect function something like this...
=VLOOKUP(J$3,Indirect(A1 & "!$U$6:$GM$20"),$C12,FALSE) Where Q209 is in cell A1 Note that Indirect is a volatile function which means that it will recalcualte every time a calculation runs in XL. If you have a lot of these formulas you could notice a substantial performance loss. -- HTH... Jim Thomlinson "Lindsey" wrote: Every month I receive a new worksheet with that month's data. I have a master sheet that I use to pull the data from this new worksheet. However, I have to go through all of the vlookup formula and change the referenced worksheet name. Is there a way to change the formula, so that it references a cell (A1) with the worksheet name? Example: =VLOOKUP(J$3,Q109!$U$6:$GM$20,$C12,FALSE) This is the formula everything is hooked up to, i.e. Q109 worksheet I then have to go through each formula and change it to Q209 worksheet. =VLOOKUP(J$3,Q209!$U$6:$GM$20,$C12,FALSE) Can I just have it reference a particular cell and when I change the name in the cell, all of the formula change which worksheet they reference? Thanks for you help! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Lindsey,
In Edit menu, choose Replace (Ctrl+H), if you expand "Options " button you can see in "Look in:" field that there is 'Formulas', which means this will replace the reference of the cells as well. so try replacing Q109 with Q209. do this using "Find Next" followed by "Replace" to be sure that it works the way you want it, and once your sure you can use "replace all". hope this works? -kc * click YES if this works! "Lindsey" wrote: Every month I receive a new worksheet with that month's data. I have a master sheet that I use to pull the data from this new worksheet. However, I have to go through all of the vlookup formula and change the referenced worksheet name. Is there a way to change the formula, so that it references a cell (A1) with the worksheet name? Example: =VLOOKUP(J$3,Q109!$U$6:$GM$20,$C12,FALSE) This is the formula everything is hooked up to, i.e. Q109 worksheet I then have to go through each formula and change it to Q209 worksheet. =VLOOKUP(J$3,Q209!$U$6:$GM$20,$C12,FALSE) Can I just have it reference a particular cell and when I change the name in the cell, all of the formula change which worksheet they reference? Thanks for you help! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That was very helpful, thanks!!!!
"Jim Thomlinson" wrote: You can use the Indirect function something like this... =VLOOKUP(J$3,Indirect(A1 & "!$U$6:$GM$20"),$C12,FALSE) Where Q209 is in cell A1 Note that Indirect is a volatile function which means that it will recalcualte every time a calculation runs in XL. If you have a lot of these formulas you could notice a substantial performance loss. -- HTH... Jim Thomlinson "Lindsey" wrote: Every month I receive a new worksheet with that month's data. I have a master sheet that I use to pull the data from this new worksheet. However, I have to go through all of the vlookup formula and change the referenced worksheet name. Is there a way to change the formula, so that it references a cell (A1) with the worksheet name? Example: =VLOOKUP(J$3,Q109!$U$6:$GM$20,$C12,FALSE) This is the formula everything is hooked up to, i.e. Q109 worksheet I then have to go through each formula and change it to Q209 worksheet. =VLOOKUP(J$3,Q209!$U$6:$GM$20,$C12,FALSE) Can I just have it reference a particular cell and when I change the name in the cell, all of the formula change which worksheet they reference? Thanks for you help! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you, that worked as well!
"KC" wrote: Hi Lindsey, In Edit menu, choose Replace (Ctrl+H), if you expand "Options " button you can see in "Look in:" field that there is 'Formulas', which means this will replace the reference of the cells as well. so try replacing Q109 with Q209. do this using "Find Next" followed by "Replace" to be sure that it works the way you want it, and once your sure you can use "replace all". hope this works? -kc * click YES if this works! "Lindsey" wrote: Every month I receive a new worksheet with that month's data. I have a master sheet that I use to pull the data from this new worksheet. However, I have to go through all of the vlookup formula and change the referenced worksheet name. Is there a way to change the formula, so that it references a cell (A1) with the worksheet name? Example: =VLOOKUP(J$3,Q109!$U$6:$GM$20,$C12,FALSE) This is the formula everything is hooked up to, i.e. Q109 worksheet I then have to go through each formula and change it to Q209 worksheet. =VLOOKUP(J$3,Q209!$U$6:$GM$20,$C12,FALSE) Can I just have it reference a particular cell and when I change the name in the cell, all of the formula change which worksheet they reference? Thanks for you help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reference Data in 2 Worksheets | Excel Discussion (Misc queries) | |||
How to reference Worksheets in VBA properly | Excel Worksheet Functions | |||
Reference to worksheets | Excel Worksheet Functions | |||
Reference different worksheets | Excel Discussion (Misc queries) | |||
VLookup using 2 worksheets, whole column reference | Excel Worksheet Functions |