Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default If/Then Formula

I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default If/Then Formula

Phil,

Try something like

=IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12)))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Phil Hageman" wrote in message
...
I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default If/Then Formula

Chip Pearson wrote
Phil,

Try something like

=IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12)))

--------------------------------^

Should be 1 as OP said

0 1


Assuming that my ^ lines up with your formula.

Chrissy.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Phil Hageman" wrote in message
...
I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If/Then Formula

Thanks for your reply, Chip. Works great!
-----Original Message-----
Phil,

Try something like

=IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12)))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Phil Hageman" wrote in message
...
I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default If/Then Formula

=IF(ISBLANK(A1),"",IF(A1=0,1,IF(A10,(AM19-V12)/(P12-V12))))

The cell you are testing is A1 - change it to what ever you want.

That does what you said ..... but ...... if A1 is < 0 or contains characters
then you get a "FALSE" as the result.

=IF(ISBLANK(A1),"",IF(A1=0,1,IF(A10,(AM19-V12)/(P12-V12),"A1<0")))

is probably more like what you want - but change the last bit in quotes.

Chrissy.


"Phil Hageman" wrote in message ...
I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default If/Then Formula

Thanks for your Chrissy. Your first formula is
essentially the same as Chips. Works great!
-----Original Message-----
=IF(ISBLANK(A1),"",IF(A1=0,1,IF(A10,(AM19-V12)/(P12-

V12))))

The cell you are testing is A1 - change it to what ever

you want.

That does what you said ..... but ...... if A1 is < 0 or

contains characters
then you get a "FALSE" as the result.

=IF(ISBLANK(A1),"",IF(A1=0,1,IF(A10,(AM19-V12)/(P12-

V12),"A1<0")))

is probably more like what you want - but change the last

bit in quotes.

Chrissy.


"Phil Hageman" wrote in message

...
I need a formula to return three values:

If Then
blank blank
0 1
0 (AM19-V12)/(P12-V12)


Thanks,
Phil



.

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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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