Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JN JN is offline
external usenet poster
 
Posts: 29
Default IF statement with range

I know it's something obvious but I'm getting error messages, no results...

A B
Bob 1
Sue 7
Joe 2


I need to look at the entire range of col B and if it is = to 1, give me the
corresponding text in Col A. I was using =IF(B1:B3="1",A1:A3,"") but it's
obviously wrong. My whole goal is to look at col B, find the top 5 and give
the corresponding name sin col A. Any help would be greatly appreciated!



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default IF statement with range

Hi JN,

Try:
=INDEX(A1:A3,MATCH(1,B1:B3,0))
If the ranking/value for the person you want to return is in another cell, replace the '1' in the formula with the cell reference.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"JN" wrote in message ...
I know it's something obvious but I'm getting error messages, no results...

A B
Bob 1
Sue 7
Joe 2


I need to look at the entire range of col B and if it is = to 1, give me the
corresponding text in Col A. I was using =IF(B1:B3="1",A1:A3,"") but it's
obviously wrong. My whole goal is to look at col B, find the top 5 and give
the corresponding name sin col A. Any help would be greatly appreciated!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JN JN is offline
external usenet poster
 
Posts: 29
Default IF statement with range

That is EXACTLY what I needed and I would have never come up with it on my
own! You Rule! Thank you so very, very much!

"macropod" wrote:

Hi JN,

Try:
=INDEX(A1:A3,MATCH(1,B1:B3,0))
If the ranking/value for the person you want to return is in another cell, replace the '1' in the formula with the cell reference.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"JN" wrote in message ...
I know it's something obvious but I'm getting error messages, no results...

A B
Bob 1
Sue 7
Joe 2


I need to look at the entire range of col B and if it is = to 1, give me the
corresponding text in Col A. I was using =IF(B1:B3="1",A1:A3,"") but it's
obviously wrong. My whole goal is to look at col B, find the top 5 and give
the corresponding name sin col A. Any help would be greatly appreciated!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JN JN is offline
external usenet poster
 
Posts: 29
Default IF statement with range

I don't suppose there is anything that can be done when I have a duplicate
ranking (2 cells with same ranking)...

"macropod" wrote:

Hi JN,

Try:
=INDEX(A1:A3,MATCH(1,B1:B3,0))
If the ranking/value for the person you want to return is in another cell, replace the '1' in the formula with the cell reference.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"JN" wrote in message ...
I know it's something obvious but I'm getting error messages, no results...

A B
Bob 1
Sue 7
Joe 2


I need to look at the entire range of col B and if it is = to 1, give me the
corresponding text in Col A. I was using =IF(B1:B3="1",A1:A3,"") but it's
obviously wrong. My whole goal is to look at col B, find the top 5 and give
the corresponding name sin col A. Any help would be greatly appreciated!




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 STATEMENT Range Bee Excel Discussion (Misc queries) 5 July 30th 07 12:33 AM
range in an IF statement Dorothy J Excel Worksheet Functions 9 January 12th 07 07:44 PM
IF statement with a range ricky Excel Worksheet Functions 8 October 26th 06 06:32 PM
Use a range name in VB with IF Then Else statement spydor Excel Discussion (Misc queries) 1 January 6th 06 01:20 AM
IF Statement with a range Phillycheese5 Excel Worksheet Functions 8 July 28th 05 08:03 AM


All times are GMT +1. The time now is 12:19 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"