Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Vlookup Reference Certain Worksheets

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Vlookup Reference Certain Worksheets

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   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 94
Default Vlookup Reference Certain Worksheets

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Vlookup Reference Certain Worksheets

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Vlookup Reference Certain Worksheets

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
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
Reference Data in 2 Worksheets [email protected] Excel Discussion (Misc queries) 0 June 5th 09 12:35 AM
How to reference Worksheets in VBA properly Michael.Tarnowski Excel Worksheet Functions 8 February 10th 09 03:14 PM
Reference to worksheets Thys Excel Worksheet Functions 4 February 3rd 09 04:59 AM
Reference different worksheets WLMPilot Excel Discussion (Misc queries) 2 December 27th 07 03:42 PM
VLookup using 2 worksheets, whole column reference ROSIE Excel Worksheet Functions 1 February 22nd 06 12:50 AM


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