ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Trying to lookup values on another sheet (https://www.excelbanter.com/excel-worksheet-functions/247692-trying-lookup-values-another-sheet.html)

David Ryan

Trying to lookup values on another sheet
 
Hi i have a spreadsheet with multiple workbooks.
on one workbook data is entered using lists. (the data for the Lists is on a
workbook called "lists")
when data is selected from the list i need the row above to display a value
based on the list choice.
eg if i select "chc" from the list, then the cell above displays
"06:00:14:30" if "CW" was selected from the drop down list then the cell
above displays "06:00 to 14:00"
this data is on a workbook called "Times"

CHC 06:00 to 14:30 8
CW 06:00 to 14:00 6

the formula i am using is

=IF(ISERROR(MATCH(C8,Times!$A$2:$A$21,0)),"",LOOKU P(C8,Times!$B$2:$B$21))

this seems to select the first time range only and does not seem to
reference all the data, or update if you change the list choice.

i have tried changing the sort of the "lookup" range but that does not seem
to help

hope someone can help.




Jacob Skaria

Trying to lookup values on another sheet
 
Try the below instead

=IF(ISERROR(MATCH(C8,Times!$A$2:$A$21,0)),"",
VLOOKUP(C8,Times!$A$2:$B$21,2,0))

If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi i have a spreadsheet with multiple workbooks.
on one workbook data is entered using lists. (the data for the Lists is on a
workbook called "lists")
when data is selected from the list i need the row above to display a value
based on the list choice.
eg if i select "chc" from the list, then the cell above displays
"06:00:14:30" if "CW" was selected from the drop down list then the cell
above displays "06:00 to 14:00"
this data is on a workbook called "Times"

CHC 06:00 to 14:30 8
CW 06:00 to 14:00 6

the formula i am using is

=IF(ISERROR(MATCH(C8,Times!$A$2:$A$21,0)),"",LOOKU P(C8,Times!$B$2:$B$21))

this seems to select the first time range only and does not seem to
reference all the data, or update if you change the list choice.

i have tried changing the sort of the "lookup" range but that does not seem
to help

hope someone can help.




David Ryan

Trying to lookup values on another sheet
 
Hi Jacob worked a treat. Thanks

"Jacob Skaria" wrote:

Try the below instead

=IF(ISERROR(MATCH(C8,Times!$A$2:$A$21,0)),"",
VLOOKUP(C8,Times!$A$2:$B$21,2,0))

If this post helps click Yes
---------------
Jacob Skaria


"David Ryan" wrote:

Hi i have a spreadsheet with multiple workbooks.
on one workbook data is entered using lists. (the data for the Lists is on a
workbook called "lists")
when data is selected from the list i need the row above to display a value
based on the list choice.
eg if i select "chc" from the list, then the cell above displays
"06:00:14:30" if "CW" was selected from the drop down list then the cell
above displays "06:00 to 14:00"
this data is on a workbook called "Times"

CHC 06:00 to 14:30 8
CW 06:00 to 14:00 6

the formula i am using is

=IF(ISERROR(MATCH(C8,Times!$A$2:$A$21,0)),"",LOOKU P(C8,Times!$B$2:$B$21))

this seems to select the first time range only and does not seem to
reference all the data, or update if you change the list choice.

i have tried changing the sort of the "lookup" range but that does not seem
to help

hope someone can help.





All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com