#1   Report Post  
Jambruins
 
Posts: n/a
Default If formula help...

I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi

does the following formula give you what you want?

=IF(OR(AND(R2="W",Q20),AND(R2="L",Q2<0)),Q2,IF(AN D(R2="W",Q2<0),100,IF(AND(R2="L",Q20),-100,"check
entry")))

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Jambruins" wrote in message
...
I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.



  #4   Report Post  
ww
 
Posts: n/a
Default

Try
=IF(AND(R2="w",Q20),Q2,IF(AND(R2="w",Q2<0),100,IF (AND(R2="l",Q20),-100,Q2)))

HTH

"Jambruins" wrote:

I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.

  #5   Report Post  
Jambruins
 
Posts: n/a
Default

that seems to work, thanks.

"JulieD" wrote:

Hi

does the following formula give you what you want?

=IF(OR(AND(R2="W",Q20),AND(R2="L",Q2<0)),Q2,IF(AN D(R2="W",Q2<0),100,IF(AND(R2="L",Q20),-100,"check
entry")))

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Jambruins" wrote in message
...
I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.






  #6   Report Post  
bj
 
Posts: n/a
Default

try
=if(r2="W",if(Q20,Q2,100),if(Q20,-100,Q2))
you may need to play with Q20 to be Q2=0
If R2 can be something other than W or L you may have to add to the equation

"Jambruins" wrote:

I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.

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
how do i write a formula and keep in in formula form, so it DOESN. norcalchick2207 Excel Discussion (Misc queries) 2 February 4th 05 08:38 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Excel 97 - Adding Every 8th Row - Formula should work, but doesn't Damaeus Excel Worksheet Functions 12 January 23rd 05 04:52 PM
Help with array formula Excel Worksheet Functions 2 January 20th 05 04:17 PM
how to enter a formula using column() function for a range Mike Peter Excel Worksheet Functions 6 December 8th 04 07:11 AM


All times are GMT +1. The time now is 04:59 AM.

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"