Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Creating Print Macro
I have two linked worksheets where in the first sheet is where I have over
100 employee data stored and in the second sheet, I have a specific template that contains vlookup formulas that will populate the sheet based on one input assumption. So if I input Joe Smith in the input cell in Sheet 1, Sheet 2 will automatically fill in data related to Joe Smith. Is it possible to create a macro where if there is an "x" next to the employee data, that sheet 2 will automatically populate, then print employee 1 data, move to next cell marked with "X" and populate and print the next employee data, and so forth? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Creating Print Macro
You can loop through the column with the "X" and copy the name to the input cell in Sheet1 and print
Something like this A column have the names B column the x It will copy the value to A1 on sheet1 in this example and then print Sheet2 Sub test() Dim cell As Range For Each cell In Sheets("Sheet1").Columns("B").SpecialCells(xlCellT ypeConstants) If LCase(cell.Value) = "x" Then Sheets("Sheet1").Range("A1").Value = cell.Offset(0, -1).Value Sheets("Sheet2").PrintOut End If Next cell End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Confused" wrote in message ... I have two linked worksheets where in the first sheet is where I have over 100 employee data stored and in the second sheet, I have a specific template that contains vlookup formulas that will populate the sheet based on one input assumption. So if I input Joe Smith in the input cell in Sheet 1, Sheet 2 will automatically fill in data related to Joe Smith. Is it possible to create a macro where if there is an "x" next to the employee data, that sheet 2 will automatically populate, then print employee 1 data, move to next cell marked with "X" and populate and print the next employee data, and so forth? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need a print macro to print only a certain number of pages | Excel Discussion (Misc queries) | |||
Creating a Print Button | New Users to Excel | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Macro to open print window and set to print entire workbook | Excel Discussion (Misc queries) | |||
Create a print macro that would automatically select print area? | Excel Worksheet Functions |