#1   Report Post  
Posted to microsoft.public.excel.misc
Jim Jim is offline
external usenet poster
 
Posts: 615
Default if formula?

Hello,

In A1 I will have one of the following number: 0, 1, or 2, which represents
the number of clients lost.

In cell B1 I have the text "0 Clients lost"
In Cell B2 I have the text "1 Clients lost"
In Cell B3 I have the text "2 Clients lost"

In C1 I have $800 (which goes with B1)
In C2 I have $300 (which goes with B2)
In C3 I have $0 (which goes with B2)

In D1, I would like to return the value of the above. For example if "0" is
selected in A1, then D1 will return $800.

Thanks for the help.
Jim
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default if formula?

hi
try this.....
=IF(A1=0, C1,IF(A1=1,C2,C3))

Regards
FSt1

"Jim" wrote:

Hello,

In A1 I will have one of the following number: 0, 1, or 2, which represents
the number of clients lost.

In cell B1 I have the text "0 Clients lost"
In Cell B2 I have the text "1 Clients lost"
In Cell B3 I have the text "2 Clients lost"

In C1 I have $800 (which goes with B1)
In C2 I have $300 (which goes with B2)
In C3 I have $0 (which goes with B2)

In D1, I would like to return the value of the above. For example if "0" is
selected in A1, then D1 will return $800.

Thanks for the help.
Jim

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default if formula?

Hi,

Try this array formula

=INDEX(C1:C3,MATCH(A1,LEFT(B1:B3,1)+0,0))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"Jim" wrote:

Hello,

In A1 I will have one of the following number: 0, 1, or 2, which represents
the number of clients lost.

In cell B1 I have the text "0 Clients lost"
In Cell B2 I have the text "1 Clients lost"
In Cell B3 I have the text "2 Clients lost"

In C1 I have $800 (which goes with B1)
In C2 I have $300 (which goes with B2)
In C3 I have $0 (which goes with B2)

In D1, I would like to return the value of the above. For example if "0" is
selected in A1, then D1 will return $800.

Thanks for the help.
Jim

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



All times are GMT +1. The time now is 11:39 PM.

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"