Hello,
I have tried searching through old posts but nothing seems to fit my scenario, and I am such a VBA novice that I don't know how to pick out the parts that could potentially work. I have a macro that is filtering column N for the word "done." Then I am inserting a new column S and want to add a formula (to find the clean date from column Q) in all visible cells in S.
I realized that it is not working properly because the range that I have selected is not looking at the visible cell in column S, just starting in cell S2 and then the rest of my macro is providing bad data. What code would I use to find that first visible cell in Column S, regardless of it starting in Cell S6 or cell S266?
The next problem that I am having is that I would like to copy that formula to get my clean date in that visible cell and fill down to the last row in column S, so that is providing the date that is in the corresponding row in column Q. I have declared lastRow as Long
Any insight will be appreciated.
I have tried searching through old posts but nothing seems to fit my scenario, and I am such a VBA novice that I don't know how to pick out the parts that could potentially work. I have a macro that is filtering column N for the word "done." Then I am inserting a new column S and want to add a formula (to find the clean date from column Q) in all visible cells in S.
VBA Code:
Range("S2").Select
ActiveCell.FormulaR1C1 = "=INT(RC[-2])"
I realized that it is not working properly because the range that I have selected is not looking at the visible cell in column S, just starting in cell S2 and then the rest of my macro is providing bad data. What code would I use to find that first visible cell in Column S, regardless of it starting in Cell S6 or cell S266?
The next problem that I am having is that I would like to copy that formula to get my clean date in that visible cell and fill down to the last row in column S, so that is providing the date that is in the corresponding row in column Q. I have declared lastRow as Long
VBA Code:
lastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Any insight will be appreciated.