Formula to calculate IF a certain cell has data and leave blank if not.

lzweifel

Board Regular
I know this is simple, but I can't quite get it...

IF B26 has any information I want H26 to deliver \$155.00, but if B26 has no information in it I want it left blank.

L

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

JumboCactuar

Well-known Member
Code:
``=IF(B26="","",155)``

change 155 part to whatever

Last edited:

Fluff

MrExcel MVP, Moderator
=IF(B26<>"","\$155.00","")

lzweifel

Board Regular
Yes that works Fluff... thank you. Now what if I want to have a formula to calculate within that. So, now...

=IF(B26)<>"", (I26*G26) So, if there is information in B26 that would populate I26 and then I would want calculate G26 x I26.

What I am doing is if there is information in B26, 27, 28 etc. then calculate a rate and then multiply that rate by how many units in another cell... but if there is nothing in the B column cell I want the remainder of the line to remain blank.

Thanks!

Fluff

MrExcel MVP, Moderator

Not sure I understand what you're after.
Do you simply want H26 to calculate I26*G26 if B26 has a value?

jtakw

Well-known Member
=IF(B26<>"","\$155.00","")

Hi Fluff,

Are you sure you didn't mean this:

=IF(B26<>"",155,"")

then have the cell formatted currency?

Fluff

MrExcel MVP, Moderator

I could have done it that way, but decided to take the OP literally.

lzweifel

Board Regular
Yes, you have it correct..... I have a row, which in the column B may or may not have information entered into it. IF information is entered in I want my rates to appear in another column (first formula) and when a number (quantity) is entered in a third column a separate formula will calculate the rate and quantity giving me a column of totals.... BUT, if nothing is entered in that first column I want the entire row to appear blank, not with zeros.

B) Text entered by user..... G) Quantity entered by user.... H) Rate Formula =IF(B26<>"","\$155.00","").... J) formula to calculate G*H (Quantity x Rate)

If NO text is entered in column B then the entire row should stay blank.

Thanks!!

L

Fluff

MrExcel MVP, Moderator
In J26
=IF(H26<>"",G26*H26,"")

lzweifel

Board Regular
PERFECT!!!!! Thank you so much for your help!! Much appreciated!

Replies
4
Views
91
Replies
4
Views
101
Replies
5
Views
97
Replies
2
Views
121
Replies
3
Views
80