Excel Help, Formula to not show a blank cell

eford

New Member
Joined
Apr 1, 2016
Messages
14
Ok guys I have a questions that I hope you can help with.

I have a pivot table that has this information among other values
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Months[/TD]
[TD]Agent Code[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AA1234567[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]AA2345678[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]AA3456789[/TD]
[/TR]
[TR]
[TD]28[/TD]
[TD]AA4567891[/TD]
[/TR]
[TR]
[TD]29[/TD]
[TD]AA5678912[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]AA6789123[/TD]
[/TR]
</tbody>[/TABLE]


What I am trying to accomplish is write a formula that will show the value for all AA #s that have less than 12 months.

The formula I am using does not give me the result I want:

=IF(ISBLANK('Sheet tab name'!$C5),""IF('Sheet tab name'!$B5<=12,'Sheet tab name'!$C5,""))

And it gives me this result:

[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]AA1234567[/TD]
[/TR]
[TR]
[TD]AA2345678[/TD]
[/TR]
[TR]
[TD]AA3456789[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]AA6789123[/TD]
[/TR]
</tbody>[/TABLE]

What changes do I need to make to return this result:

[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]AA1234567[/TD]
[/TR]
[TR]
[TD]AA2345678[/TD]
[/TR]
[TR]
[TD]AA3456789[/TD]
[/TR]
[TR]
[TD]AA6789123[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks for all your help.
 
Looks like you just don't want to see rows that are greater than 12 months. I don't think that can be done with a formula. Try evaluating each row one at a time with vba and hiding any >12. ---assuming all this is one sheet---
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top