Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 298
Default Referencing cell text in a lookup

I have a spreadsheet of 20 columns. Each column of data uses a lookup to
reference it's own worksheet. The column header for each column is the same
as the worksheet name.

For example
Column 1: Header '9th May', then =VLOOKUP($A1,'9th May'!$A$2:$D$21,4,FALSE)
Column 2: Header '16th May',then =(VLOOKUP($A1,'16th May'!$A$2:$D$21,4,FALSE)
and so on for each column

So for 20 columns I have to manually change the worksheet reference each time.

Is they a way to reference the text of the column header instead ie. replace
'9th May', with the text for column 1? This way I can set up the first column
and then autofill the remaining columns.


--
Rich
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 301
Default Referencing cell text in a lookup

Try this:
=VLOOKUP($A1,INDIRECT("'"&$A1&"'!$A$2:$D$21"),4,FA LSE)
Note the single quote in the first set of quotes & again before the !


"Rich" wrote in message
...
I have a spreadsheet of 20 columns. Each column of data uses a lookup to
reference it's own worksheet. The column header for each column is the

same
as the worksheet name.

For example
Column 1: Header '9th May', then =VLOOKUP($A1,'9th

May'!$A$2:$D$21,4,FALSE)
Column 2: Header '16th May',then =(VLOOKUP($A1,'16th

May'!$A$2:$D$21,4,FALSE)
and so on for each column

So for 20 columns I have to manually change the worksheet reference each

time.

Is they a way to reference the text of the column header instead ie.

replace
'9th May', with the text for column 1? This way I can set up the first

column
and then autofill the remaining columns.


--
Rich



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 298
Default Referencing cell text in a lookup

Yes that has worked, thanks very much
--
Rich


"Bob Umlas" wrote:

Try this:
=VLOOKUP($A1,INDIRECT("'"&$A1&"'!$A$2:$D$21"),4,FA LSE)
Note the single quote in the first set of quotes & again before the !


"Rich" wrote in message
...
I have a spreadsheet of 20 columns. Each column of data uses a lookup to
reference it's own worksheet. The column header for each column is the

same
as the worksheet name.

For example
Column 1: Header '9th May', then =VLOOKUP($A1,'9th

May'!$A$2:$D$21,4,FALSE)
Column 2: Header '16th May',then =(VLOOKUP($A1,'16th

May'!$A$2:$D$21,4,FALSE)
and so on for each column

So for 20 columns I have to manually change the worksheet reference each

time.

Is they a way to reference the text of the column header instead ie.

replace
'9th May', with the text for column 1? This way I can set up the first

column
and then autofill the remaining columns.


--
Rich




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Referencing cell text in a lookup

I'de name my First master sheet "Main"
with your subsequest sheets names in:
A3, B3, C3, D3

then in Sheet2 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("A3").Value
End Sub

then in Sheet3 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("B3").Value
End Sub

then in Sheet4 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("C3").Value
End Sub

then in Sheet5 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("D3").Value
End Sub

and so on...


"Rich" wrote:

I have a spreadsheet of 20 columns. Each column of data uses a lookup to
reference it's own worksheet. The column header for each column is the same
as the worksheet name.

For example
Column 1: Header '9th May', then =VLOOKUP($A1,'9th May'!$A$2:$D$21,4,FALSE)
Column 2: Header '16th May',then =(VLOOKUP($A1,'16th May'!$A$2:$D$21,4,FALSE)
and so on for each column

So for 20 columns I have to manually change the worksheet reference each time.

Is they a way to reference the text of the column header instead ie. replace
'9th May', with the text for column 1? This way I can set up the first column
and then autofill the remaining columns.


--
Rich

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Referencing cell text in a lookup

Wooooooooe,,,,

Better forget my suggestion;
I was way OFF BASE on that one,,,

Sorry,
Jim


"Jim May" wrote:

I'de name my First master sheet "Main"
with your subsequest sheets names in:
A3, B3, C3, D3

then in Sheet2 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("A3").Value
End Sub

then in Sheet3 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("B3").Value
End Sub

then in Sheet4 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("C3").Value
End Sub

then in Sheet5 paste in:
Private Sub Worksheet_Activate()
ActiveSheet.Name = Sheets("Main").Range("D3").Value
End Sub

and so on...


"Rich" wrote:

I have a spreadsheet of 20 columns. Each column of data uses a lookup to
reference it's own worksheet. The column header for each column is the same
as the worksheet name.

For example
Column 1: Header '9th May', then =VLOOKUP($A1,'9th May'!$A$2:$D$21,4,FALSE)
Column 2: Header '16th May',then =(VLOOKUP($A1,'16th May'!$A$2:$D$21,4,FALSE)
and so on for each column

So for 20 columns I have to manually change the worksheet reference each time.

Is they a way to reference the text of the column header instead ie. replace
'9th May', with the text for column 1? This way I can set up the first column
and then autofill the remaining columns.


--
Rich

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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
How do I set text to top of cell next to wrap text in Excel? Carpenter Gary New Users to Excel 1 October 25th 05 06:26 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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