Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if the excel statements

Status
Not open for further replies.

cknipe

MIS
Jul 28, 2005
597
US
Lets say I have numbers in Column. C2 is how many units I billed last month, C4 is how many units I counted this month. I would like for C3 to copy the value of C2 if C5 is less than 0. However if C5 is greater than 0 I would like for c3 to equal the value of C4 . Is this function possible in excel?

C2 - 5000
C3 - <formula result>
C4 - 4999
C5 - -1
 
If C5 is calculated as a difference (C4-C2), use MAX(C2, C4).

combo
 
Okay, okay, everyone here is pedantic.
=if(C5<0, C4, C2)
(function "if" has three parameters, condition-to-test, value-if-true, value-if-false)

 
oh, and I'm pedantic too: You didn't specify what to do if C5=0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top