formula help - subtracting numbers in two colums but using a specificnumber if one column is greater

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

I am working on a spreadsheet and need help developiung a formula (my
excel knolwedge is very basic)....

In y2, I want a formula that subtracts w2 from x2 but if x2 is > w2 I
want y2 to reflect the number in w2. Can anyone help me with that? I
will be eternally grateful!
 
I THINK I JUST FIGURED IT OUT!! THE FORMULA I ARRIVED AT IS

=IF(X2>W2, W2,SUM(W2,-X2))

DOES THIS SEEM CORRECT? I USED CSE WHEN I ENTERED THE FORMULA
 
You sure that's what you want?

You will always get a zero or negative number in Y2 if X2<=W2


=IF(X2>W2,W2,X2-W2)


Gord Dibben MS Excel MVP
 
You don't need the SUM function.

You have changed your parameters from your original posting.

"subtracts w2 from x2" was your original.

Here you are subtracting X2 from W2

You do not need CSE

See my earlier reply.


Gord
 
Back
Top