Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

any ideas to help make this work
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Will C1 ever be a negative number?

What should happen if B=D?

--
Biff
Microsoft Excel MVP


"Dolphinsblue" wrote in message
...
any ideas to help make this work



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Sorry trying to find a way to make this work, C1 will be a percentage of the
B1 and D1 left that out.

"Dolphinsblue" wrote:

any ideas to help make this work

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Try this...

You still didn't say what should happen if B=D so in that case the formula
will return a blank.

=IF(B1D1,-C1,IF(D1B1,C1,""))

--
Biff
Microsoft Excel MVP


"Dolphinsblue" wrote in message
...
Sorry trying to find a way to make this work, C1 will be a percentage of
the
B1 and D1 left that out.

"Dolphinsblue" wrote:

any ideas to help make this work



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Ok Sorry, For example I need this to happen


If B1 has 40 in it and D1 has 60 in it then C1 should be -66.6%

but

If B1 has 60 in it and D1 has 40 in it then C1 should be 150%

and if B1 and D1 are equal C1 is 100%



"T. Valko" wrote:

Try this...

You still didn't say what should happen if B=D so in that case the formula
will return a blank.

=IF(B1D1,-C1,IF(D1B1,C1,""))

--
Biff
Microsoft Excel MVP


"Dolphinsblue" wrote in message
...
Sorry trying to find a way to make this work, C1 will be a percentage of
the
B1 and D1 left that out.

"Dolphinsblue" wrote:

any ideas to help make this work






  #6   Report Post  
Posted to microsoft.public.excel.misc
RA RA is offline
external usenet poster
 
Posts: 53
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

How about this?

=IF(B1D1,((B1-D1)/D1)+1,(((B1-D1)/D1)+1)*-1)
  #7   Report Post  
Posted to microsoft.public.excel.misc
RA RA is offline
external usenet poster
 
Posts: 53
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Soory, got it backwards:

=IF(B1<D1,(((B1-D1)/D1)+1)*-1,((B1-D1)/D1)+1)

"RA" wrote:

How about this?

=IF(B1D1,((B1-D1)/D1)+1,(((B1-D1)/D1)+1)*-1)

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =IF(AND(B1D1)=C1*-1,IF(AND(D1B1)=C1*1))

Ok, I think we finally understand!

Try this:

=IF(D1=0,"",IF(B1<D1,-ROUND(B1/D1,3),ROUND(B1/D1,3)))

Format as Percentage to 1 decimal place.

--
Biff
Microsoft Excel MVP


"Dolphinsblue" wrote in message
...
Ok Sorry, For example I need this to happen


If B1 has 40 in it and D1 has 60 in it then C1 should be -66.6%

but

If B1 has 60 in it and D1 has 40 in it then C1 should be 150%

and if B1 and D1 are equal C1 is 100%



"T. Valko" wrote:

Try this...

You still didn't say what should happen if B=D so in that case the
formula
will return a blank.

=IF(B1D1,-C1,IF(D1B1,C1,""))

--
Biff
Microsoft Excel MVP


"Dolphinsblue" wrote in message
...
Sorry trying to find a way to make this work, C1 will be a percentage
of
the
B1 and D1 left that out.

"Dolphinsblue" wrote:

any ideas to help make this work






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 05:25 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"