MrExcel Publishing
Your One Stop for Excel Tips & Solutions

simple condition


Posted by Shane on November 22, 2000 4:09 AM

My knowlede is very limited I know but, I was wondering how to complete this formula:
Cell 2 is divided by cell 1, and then multiplied by cell 2 (this works very well of course),
But I then need to multiply cell 2 by cell 2 if cell 1 = 0.

I know it should be simple, but I cant quite figure it out.
If someone could help out, I would be truely grateful.
Thanx
Shane



Posted by Jimmy on November 22, 2000 5:29 AM

Shane, try this. You can change the cell references to fit your needs. I used A1 and B1 to eneter the data and placed the formula in C3 just to try it out
=IF(A1>0,B1/A1*B1,IF(A1<=0,B1*B1,""))

Posted by Shane on November 22, 2000 1:20 PM

THANKYOU!!

Thankyou very much for your help, this formula works extremely well.

Yours in gratitude
Shane

Posted by Shane on November 22, 2000 1:36 PM

Re: THANKYOU!!

Sorry, I was a bit hasty!,
The formula you gave me gets rid of the #div/0! message, but it is not exactly what I wanted.

I am now trying to use the , else function

Thanks anyway
Shane