Working on another macro (still green here) to reformat some data in a table that involves adding some headers and formatting cells. When I am running into is this:
In column E and F, most rows (the data points) have either a number or a description in the cell. Every so often, there is a row that has no value in E or F (this will be a header row for the data below it). There are just under 500 rows in all.
I can loop through the rows fine, and in column D I can use a VBA loop to insert a formula into any column D cell in which that row has no value in E or F like so:
This works fine and it ONLY puts the formula into the cells in column D where the row is otherwise empty in E and F (I'm just referencing E as the IF since E and F are always empty together).
However, when I try to loop through with a For + and If statement in VBA to copy the value in D into E (or even just add a "Yes" as a test out in Column N or something), the vba loop and If statement do no recognize E or F as empty. That code is:
I've got the copy and paste "turned off" with a comment flag for now, but as this loops through all ~500 rows, it does not insert a "Yes" into column 16 in any of the rows in which column 5 (column E) is empty.
I have tried this with = "", with IsEmpty() = True, and I have cycled through tons of these rows to confirm there is no value in any of them and there does not appear to be anything. I am assuming that I am missing something fairly simple here as I have managed to cook up quite a few other loops that reference if a cell or adjacent cell is empty without issue. Any help appreciated, this is basically my last step (I think) to completing this Macro and putting it to use.
This is what the macro runs to, and what should be happening is the stuff in column D gets copied into Column E where the cells are colored up:Untitled.jpg
Thanks
Bookmarks