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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lookup data

Status
Not open for further replies.

workshop

Technical User
Nov 9, 2001
55
US
colum1 colum2 colum3
1 550
6 450
1 120

I am trying to define in the colum 3 that if the data in colum1 is greater or equal 5 combine with colum2 is greater or equal 150, if yes then label 1 otherwhy label 0... (for instance the data above... the row1 in colum3 should be 0, row2 in colum3 should be 1, and row3 in colum3 should be 0...)

Thank you
 
You could try a nested if statement /formula.

Paste the following formula into the range C2 and then drag / copy it to the appropriate



=IF(A2>=5,IF(B2>=150,1,0),0)




Understanding an If Formula

= IF( a = b THEN value ELSE value )
= IF( a = b , value , value )
= IF( A2 >= 5 , 1 , 0 )

Nesting an If Formula

=IF( a = b THEN IF( c = d THEN value ELSE value) ELSE value)
=IF( a = b , IF( c = d , value , value) , value)
=IF(A2 >= 5 , If( B2 >= 150 , 1 , 0 ) , 0 )


 
Hello, workshop.

Or use at C2:
=IF(AND(A2>=5,B2>=150),1,0)

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top