I receive excel files from a bank that contains information that I need in a certain column. So I want to loop through the specific column and get the values of those cells. Lets say I select column B. I start at B1 and loop through the column cells. But once I get to a merged cell, which there are quite a lot of, the merged cell throws me off of column B when I try to move past it. I'm using Offset(1, 0) to go down the column.
'Here is a quick example of how the selected cell will move
'I'm using an index to move down 15 cells
'Merge cell A2 and B2 before running the macro
Sub test()
Dim index As Integer
index = 0
Range("B1").Select
Do While index < 15
Selection.Offset(1, 0).Select
index = index + 1
Loop
End Sub
The selection moves from B1 to B2, which is merged with A2, then continue to A3 instead of B3.