Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 504
Default IF/AND VLOOKUP question...

Hi, here's what I'm looking for... column A lists days of the week. Column E
list room numbers. Column C lists codes. This data will change often and may
list days, codes or rooms more than once. I would like to set a condition
such as: if a row contains "Monday" and Room "1" then return the code in
column C from the same row. This was easy to do when I chose specific cells,
but because the info may change within the columns, I need to formula to look
at whole columns or ranges. So, anytime a row matches Monday and room 1,
wherever it is, column C code is returned. I've come close using IF ((AND
statement but it won't allow me to use ranges...any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF/AND VLOOKUP question...

Assume source data as described starts in row2 down

Assume inputs for the day and the room number
will be made in G2:H2 down, eg
in G2: Monday
in H2: 1

then you could place in I2, and array-enter the formula by pressing
CTRL+SHIFT+ENTER:
=IF(COUNTA(G2:H2)<2,"",INDEX(C$2:C$100,MATCH(1,(A$ 2:A$100=G2)*(E$2:E$100=H2),0)))
Copy I2 down as far as required. Adapt the ranges to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kevin" wrote:
Hi, here's what I'm looking for... column A lists days of the week. Column E
list room numbers. Column C lists codes. This data will change often and may
list days, codes or rooms more than once. I would like to set a condition
such as: if a row contains "Monday" and Room "1" then return the code in
column C from the same row. This was easy to do when I chose specific cells,
but because the info may change within the columns, I need to formula to look
at whole columns or ranges. So, anytime a row matches Monday and room 1,
wherever it is, column C code is returned. I've come close using IF ((AND
statement but it won't allow me to use ranges...any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 504
Default IF/AND VLOOKUP question...

Thank you Max, it worked fine. As always, your fast, accurate response made
someone else's life a lot easier. Much appreciated, -Kevin


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF/AND VLOOKUP question...

Welcome, and glad it worked fine for you, Kevin.
Appreciate the feedback.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Kevin" wrote in message
...
Thank you Max, it worked fine. As always,
your fast, accurate response made
someone else's life a lot easier. Much appreciated, -Kevin




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
vlookup question HROBERTSON Excel Discussion (Misc queries) 2 February 7th 07 09:19 PM
VLOOKUP question Jonah Excel Discussion (Misc queries) 1 November 9th 06 05:18 AM
=vlookup question scott Excel Discussion (Misc queries) 0 June 8th 06 06:14 PM
VLOOKUP Question.. nastech Excel Discussion (Misc queries) 8 February 12th 06 11:22 AM
VLOOKUP question jspizman Excel Worksheet Functions 3 January 22nd 06 09:10 PM


All times are GMT +1. The time now is 06:37 PM.

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"