Empty Dynamic cells not empty

Yoepy

New Member
Joined
Feb 22, 2015
Messages
44
I have a series of Dynamic cells with

If(something="","",do something else).

My problem is that counta or xldown etc, see the empty cells as having data.
Is there a way to have them seen as being empty. I do want to cut paste elsewhere if that helps.

Thanks.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
If I cut and paste to another column, can I not have the paste exclude the blank cells? I'm currently using XLdown, but it goes all the to the bottom of the blank cells too.
 
Last edited:
Upvote 0
Cells that have formulas are NOT considered empty (even if they are set to return the empty string). So xlDown will NOT do what you want.
Are all these "empty" cells are the bottom of the data, or are they mixed up within the column?
 
Upvote 0
Yes, they are at the bottom. Even when I cut/paste/special value, the new location blanks are still not empty.
 
Upvote 0
Even when I cut/paste/special value, the new location blanks are still not empty.
Yes, the empty string and NULL are not the same.

Are you looking to do this copy automatically using VBA?
Where are you copying from/to?
 
Upvote 0
I found how you can locate the last cell in a column that returns a value here: https://exceljet.net/formula/get-value-of-last-non-empty-cell
(specifically, the part listed "Position of the last value"), but haven't been able to convert it to VBA yet.

But I think there may be a better way of going about this. Since you are already using VBA anyway, can't you just program it to copy down your original IF formula exactly the number of rows that you need, so you don't copy it down any extra rows. Then your xlDown method would work fine.
 
Upvote 0
To make the "blank" cells genuinely blank you can use
Code:
 Range("B:B").Value = Range("B:B").Value
changing the range to suit
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,851
Members
449,194
Latest member
HellScout

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