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

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!
 
M

Michelle

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
 
G

Gord Dibben

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top