Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bobm
 
Posts: n/a
Default Return cell reference of lookup value

hello,

i am sure this is a pretty simple question but cannot work out.

i have two sheets - sheet1 and sheet2

in sheet1 i have names in Row 1 and dates in Column A

what i want to do from sheet2 is do a vlookup on a date in sheet1 and return
the cell reference (row number) of that lookup value.

and do the same with the name, do a hlookup on sheet1 and return the cell
reference (col number) of the lookup value.

This will then give me a range to plot to colour of the intersecting cell in
sheet2

i have tried using the lookup functions can only return the value, not the
cell reference. is there a better way to do this?

appreciate any help or other ways to do this.

bobm

  #2   Report Post  
bobm
 
Posts: n/a
Default

hello some more information on the function i attempting to use...

=Cell("row",VLOOKUP(B2,sheet1!A:A,1,FALSE)) 'lookup date
=Cell("col",HLOOKUP(A2,sheet1!A:G,1,FALSE)) ' lookup name

but get alert that formula contains an error


"bobm" wrote:

hello,

i am sure this is a pretty simple question but cannot work out.

i have two sheets - sheet1 and sheet2

in sheet1 i have names in Row 1 and dates in Column A

what i want to do from sheet2 is do a vlookup on a date in sheet1 and return
the cell reference (row number) of that lookup value.

and do the same with the name, do a hlookup on sheet1 and return the cell
reference (col number) of the lookup value.

This will then give me a range to plot to colour of the intersecting cell in
sheet2

i have tried using the lookup functions can only return the value, not the
cell reference. is there a better way to do this?

appreciate any help or other ways to do this.

bobm

  #3   Report Post  
ScottO
 
Posts: n/a
Default

Assuming the following:
1. Your date list is named "DateRange"
2. Your name list is named "NameRange"
3. Your date to lookup is in a cell named "DateToMatch"
4. Your name to lookup is in a cell named "NameToMatch"
5. Your data is laid out as you describe in your question

Then this formula should do the trick ...

=ADDRESS(MATCH(DateToMatch,DateRange,0)+1,MATCH(Na meToMatch,NameRange,0)+1)

Rgds,
ScottO

"bobm" wrote in message
...
| hello some more information on the function i attempting to use...
|
| =Cell("row",VLOOKUP(B2,sheet1!A:A,1,FALSE)) 'lookup date
| =Cell("col",HLOOKUP(A2,sheet1!A:G,1,FALSE)) ' lookup name
|
| but get alert that formula contains an error
|
|
| "bobm" wrote:
|
| hello,
|
| i am sure this is a pretty simple question but cannot work out.
|
| i have two sheets - sheet1 and sheet2
|
| in sheet1 i have names in Row 1 and dates in Column A
|
| what i want to do from sheet2 is do a vlookup on a date in sheet1 and
return
| the cell reference (row number) of that lookup value.
|
| and do the same with the name, do a hlookup on sheet1 and return the
cell
| reference (col number) of the lookup value.
|
| This will then give me a range to plot to colour of the intersecting
cell in
| sheet2
|
| i have tried using the lookup functions can only return the value, not
the
| cell reference. is there a better way to do this?
|
| appreciate any help or other ways to do this.
|
| bobm
|


  #4   Report Post  
bobm
 
Posts: n/a
Default

Thanks, brilliant!
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
if the value of a cell in a range is not blank, then return the v. kvail Excel Worksheet Functions 2 April 8th 05 10:07 PM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 10:13 PM
dynamic external cell reference bg.itdept Excel Worksheet Functions 4 February 19th 05 03:15 AM
Cell Reference Math Ralph Howarth Excel Worksheet Functions 0 January 26th 05 06:27 PM
cell reference show cell name (ie. D45) and not cell value ria Excel Worksheet Functions 4 November 6th 04 04:38 AM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"