Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
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.

Adbot
ADBOT LOVES YOU

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

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply