ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   selecting a row by header row in VBA (https://www.excelbanter.com/excel-programming/303868-selecting-row-header-row-vba.html)

wraithlead[_4_]

selecting a row by header row in VBA
 
I know this code probably isn't the most efficient, but i'm not worrie
about that, since it mostly does what i need. At the end, for th
underlined, i needed to select a row, by the header row instead of th
distance from the active cell.

Sub McStatTol()
' Keyboard Shortcut: Ctrl+Shift+r
Range("AK8").Select
Do
ActiveCell.Clear
If Not ActiveCell.Offset(0, -1) & ActiveCell.Offset(0, -2) = "
Then
If ActiveCell.Offset(0, -2) ActiveCell.Offset(0, -1) Then
ActiveCell.Value = ActiveCell.Offset(0, -2)
Else
ActiveCell.Value = ActiveCell.Offset(0, -1)
End If
End If
ActiveCell.Offset(1, 0).Select

_Loop_While_Not_ActiveCell.Offset(0,_-35).Value_=_\"\"_


End Sub


Is there any way to say something like -Loop While Not 'ID Number'
""-?

Thanks in advance,
00

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com