Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL: Vlookup on Calender Linked Cell 1

Status
Not open for further replies.

EricDraven

Programmer
Jan 17, 2002
2,999
GB
Hi all

I have a spreadsheet with a Calender object which returns a selected date via the linked cell property. I then need to use this selected date to perform a vlookup on a second spreadsheet. I know the vlookup code is correct as when I manually type the date into the linked cell, the lookup correctly returns the information. How is this not the case when using the value reurned by the calender object? Formatting the cell seems to have no effect on the returned value.

Cheers in advance

[blue]You wouldn't recognize a subtle plan if it painted itself purple and danced naked upon a harpsichord singing "Subtle Plans are Here Again" - Edmund Blackadder[/blue]
 
Hi Eric

Use the ISNUMBER & ISTEXT functions to determine the data type returned to the cell.


You may need to do some formatting in the vlookup eg.

ISNUMBER = TRUE
=vlookup(text(A2,"dd/mm/yyyy"),LookupRange,2,false)

or

ISTEXT = TRUE
=vlookup(VALUE(A2),LookupRange,2,false)

Depends on what is actually being returned by the calendar

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top