- tsingtao
- Oct 29, 2004
-
Borderline creepy
|
rekk1ess posted:
The following somewhat does what I want. Problem is, that it re-labels my 1st Column as 05-MM-Blank. Is there anyway to further this and Offset the FirstRow?
Sub Step_6A()
'
' Step_6A Macro
' Fills Service Number Blanks
'
'
Dim LastRow As Long
LastRow = [A65536].End(xlUp).Row
Dim FirstRow As Long
FirstRow = [L65536].End(xlUp).Row
Range(Cells(FirstRow, 12), Cells(LastRow, 12)).Select
ActiveCell.FormulaR1C1 = "05-MM-Blank"
Selection.FillDown
End Sub
Not quite sure what you mean by offset the first row, but if you mean "refer to the row under FirstRow", you should try:
FirstRow = [L65536].End(xlUp).Row.Offset(1, 0)
That will return a reference to the row directly below what FirstRow is currently being set to.
|
#
¿
Jul 26, 2009 01:52
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
Apr 28, 2024 14:04
|
|
- tsingtao
- Oct 29, 2004
-
Borderline creepy
|
Is this something you're doing through a macro, or what? If you're using a macro try something like:
code:If WhateverCell.Value = "WhateverFruit" Then
Whatevercell.EntireRow.Select
End If
Or if you want to set it up so that all rows containing a certain fruit are highlighted, try something like this:
code:Do
If WhateverCell.Value = "WhateverFruit" Then
Union(Whatevercell.EntireRow, Selection).Select
End If
'Change WhateverCell to point to the next cell to be inspected
WhateverCell = WhateverCell.Offset(1, 0)
Loop Until Len(Whatevercell.Value) = 0
|
#
¿
Jul 30, 2009 02:02
|
|