View Single Post
 
Old 05-12-2012, 03:22 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Wrighty,

Try:
Code:
Sub PropagateAcctIDs()
Application.ScreenUpdating = False
Dim LastRow As Long, i As Long, StrAcct As String
With ActiveSheet
  LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
  For i = 1 To LastRow
    If Cells(i, 9).Value = "Account Number" Then
      StrAcct = Cells(i, 10).Value
    ElseIf IsDate(Cells(i, 8).Value) Then
      Cells(i, 13).Value = StrAcct
    ElseIf Cells(i, 1).Value = "Client Name" Then
      With Cells(i, 13)
        .Value = "ACCOUNT NUMBER"
        .Font.Bold = True
      End With
    End If
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote