Need if Statement

  • Thread starter Thread starter nander
  • Start date Start date
N

nander

Column G has header qtys12mo (quanity sold last 12 months)
Column H has header onhand (quanity on hand)

I need an if statement that compares the values in these two columns
and returns the value T or Blank


If qtys12mo and onhand = 0 then T
if qtys12mo >0 and onhand = 0 then Blank
if qtys12mo<0 and onhand >0 then T
if qtys12mo>0 and onhand>0 then blank
 
=IF(AND(G2=0,H2=0),"T",IF(AND(G2>0,H2=0),"",IF(AND(G2<0,H2>0),"T",IF(AND(G2>0,H2>0),"","other"))))

fits your request, you can remove the words 'Blank', 'blank'and
'other' when you have tested the formula.
 
=IF(OR(AND(G2=0,H2=0),AND(G2<0,H2>0)),"T","")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top