Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If cell equals a text value return a value from corresponding cell

A B C
1 Room Service Use
2 10100 PSYCHIATRY MUSIC RM

Basically I need a formula that wil take If B2 = "psychiatry", print(or
list) corresponding A cell, in this case 10100. I'd liek to be able to
print(list) all the rooms of the hospital under their corresponding service.
I can total, across floors, but I am having a bear getting what I what as
described.


--
Thanks, Nick
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default If cell equals a text value return a value from correspondingcell

On 5 June, 21:13, Nick Guerrier wrote:
A * * * * * * * B * * * * * * * * * * * * * * C *
1 Room * * * * Service * * * * * * * * * *Use
2 10100 PSYCHIATRY * * *MUSIC RM

Basically I need a formula that wil take If B2 = "psychiatry", print(or
list) corresponding A cell, in this case 10100. I'd liek to be able to
print(list) all the rooms of the hospital under their corresponding service.
I can total, across floors, but I am having a bear getting what I what as
described.

--
Thanks, Nick


Use a combination of

MATCH (to work out which row in column B it is found)

and

INDEX (to return the value in column 1 row x (from above)

=INDEX(A:B,MATCH("PSYCHIATRY",B:B),1)

returns

10100

as required.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default If cell equals a text value return a value from corresponding cell

have you tried using a pivot table?

"Nick Guerrier" wrote in message
...
A B C
1 Room Service Use
2 10100 PSYCHIATRY MUSIC RM

Basically I need a formula that wil take If B2 = "psychiatry", print(or
list) corresponding A cell, in this case 10100. I'd liek to be able to
print(list) all the rooms of the hospital under their corresponding
service.
I can total, across floors, but I am having a bear getting what I what as
described.


--
Thanks, Nick


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
Return cell referance of the first cell that equals a value? Enginerd Excel Worksheet Functions 5 October 27th 09 08:08 PM
If a cell equals _, at the next row that equals _, return value fr CathyH Excel Worksheet Functions 10 May 2nd 07 07:53 PM
If cell is left blank, or equals zero, then cell equals a different cell John McMurry Excel Discussion (Misc queries) 3 April 13th 07 01:14 PM
If Cell equals text Copy Cells, B2,B3,B4 Djmask[_5_] Excel Programming 5 August 20th 05 04:11 PM
Entered text value equals a number I specify in another cell Dave S. Excel Worksheet Functions 3 June 12th 05 10:07 PM


All times are GMT +1. The time now is 09:55 AM.

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"