How to read all data of an excel file with order

How to read all data of an excel file with order

m09366023695
Enthusiast Enthusiast
293 Views
1 Reply
Message 1 of 2

How to read all data of an excel file with order

m09366023695
Enthusiast
Enthusiast

I want to read non blank data with ordering.

 

Set rngSize = ws.Range("A1:Z1000").SpecialCells(xlCellTypeConstants)



Dim hCell As Range

For Each hCell In rngSize.Cells
If IsEmpty(hCell.value) = False Then
MsgBox hCell.value
columns.Add hCell.value, ""
End If

Next hCell

 

but it returns values with non ordering. I want to read data from left to right.

for example A1,A2 etc. B1,B2 etc. 

0 Likes
294 Views
1 Reply
Reply (1)
Message 2 of 2

Ed__Jobe
Mentor
Mentor

Although this is a vba forum, you really should post your Excel questions to an Excel forum. This one is for the AutoCAD api.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes