Reputation: 996
In excel, I have one row selected. If I want to get a reference (int VBA) to one cell from that selection, how would I do it?
For example, say I have the row
[A|B|C|D|E|F|G]
selected, and I want to only get the value E.
I tried things like selection.columns(5)
, but that didn't quite work.
Any help would be greatly appreciated.
Upvotes: 0
Views: 98
Reputation: 19087
try something like:
Selection.Cells(1)
Selection.Cells(2)
Selection.Cells(5)
Selection.Cells(100)
etc
where cells are numbered from left to right and next from top to bottom.
Upvotes: 1