#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF function

I would like to replicate an "IF" function to encompass several rows of data.
For instance, I have the formula =IF(A1=B1,C1,C1), which I want the cell to
show C1 whenever A1=B1 (Cell A1 is a validation list showing data from
B1:B20). I want the "IF" formula to encompass all the rows of B data
(B1:B20), so that if A is on B2, it should show C2, and if on B3, it should
show C3, and so forth). Is it possible to create a formula within a cell A1
to do that? Many thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF function

Assuming C data is from C1:C20

=INDEX($C$1:$C$20,MATCH($A$1,$B$1:$B$20,0))

BUT you can't have formula and value in the same cell i.e the above cannot
be in A1 if understood you correctly.

HTH

"kivikatz" wrote:

I would like to replicate an "IF" function to encompass several rows of data.
For instance, I have the formula =IF(A1=B1,C1,C1), which I want the cell to
show C1 whenever A1=B1 (Cell A1 is a validation list showing data from
B1:B20). I want the "IF" formula to encompass all the rows of B data
(B1:B20), so that if A is on B2, it should show C2, and if on B3, it should
show C3, and so forth). Is it possible to create a formula within a cell A1
to do that? Many thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default IF function

One way:

=IF(ISNA(MATCH(A1,B1:B20,FALSE)),"",VLOOKUP(A1,B1: C20,2,FALSE))


In article ,
kivikatz wrote:

I would like to replicate an "IF" function to encompass several rows of data.
For instance, I have the formula =IF(A1=B1,C1,C1), which I want the cell to
show C1 whenever A1=B1 (Cell A1 is a validation list showing data from
B1:B20). I want the "IF" formula to encompass all the rows of B data
(B1:B20), so that if A is on B2, it should show C2, and if on B3, it should
show C3, and so forth). Is it possible to create a formula within a cell A1
to do that? Many thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF function

Thanks. That formula works out well.

"Toppers" wrote:

Community Message Not Available

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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
How do I nesting subtotal function within average function in Exc Amy Yeh Excel Worksheet Functions 4 January 19th 05 06:23 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


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