Hi all,
I am working with arrays that extend far beyond their actual content, and so i am looking for a way, through macros, to find the first blank cell in a column and then copy all preceding cells in that column. Thank you!
Hi all,
I am working with arrays that extend far beyond their actual content, and so i am looking for a way, through macros, to find the first blank cell in a column and then copy all preceding cells in that column. Thank you!
Try this...
![]()
Range("A1:" & Range("A:A").Find("").Offset(-1).Address).Copy
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
So the only thing is there are multiple columns in this array and so finding the first blank in the whole array won't necessarily mean finding the first blank in the column that I want, unless I interpreted the code wrongly. Or do you mean that I should replace "A' with index of whichever column I want?
Is there any way to do the same thing if I don't have the column letter but only have the column number?
cells(RowNumber,ColumnNumber)
So A1 can be written as cells(1,1)
Range("A:A").Find("")
can be written as columns(1).Find("")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks