View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Print spreadsheet replacing recipient name

Perhaps something like this. Change the ranges as needed. HTH Otto
Sub PrintAll()
Dim RngNames As Range
Dim i As Range
'Set the range of names
Set RngNames = Range("T1", Range("T" & Rows.Count).End(xlUp))
For Each i In RngNames
Range("A1").Value = i.Value
Range("A1:K50").PrintOut
Next i
End Sub
"Freddy" wrote in message
...
Essentially, what I want to do is to print a pre-selected range in an
Excel
spreadsheet yet insert a recipient's name (similar to a letter) into a
specific cell based on a list of contained in a range of cells within the
same spreadsheet. It's comparable to the mail merge in Word. However, I am
not using Word because Excel contains special functions that I need in the
spreadsheet. I have not written any pertinent code yet. I am using
Microsoft
Visual Basic 6.3 with Microsoft Excel 2000.