Basically in my workbook I have 2 sheets,
I have a table of information of different parameters and I have a calculation sheet.
If possible, I want to create a macro that will:
1. Input data from row 1 in the table into the calculation sheet
2. Save the calc sheet as a pdf with a file name corresponding to a cell in the sheet.
3. Repeat inputting data and saving the files for rows 2,3,4etc in the table.
Thank you in advance!!!
I am new to writing macros but I have managed to get this so far, this macro successfully inputs the data from row 1 of my table into my calc sheet and saves it as a pdf. I just need help with the looping, I need it to do it for row 2 then save, row 3 then save etc...
I have a table of information of different parameters and I have a calculation sheet.
If possible, I want to create a macro that will:
1. Input data from row 1 in the table into the calculation sheet
2. Save the calc sheet as a pdf with a file name corresponding to a cell in the sheet.
3. Repeat inputting data and saving the files for rows 2,3,4etc in the table.
Thank you in advance!!!
I am new to writing macros but I have managed to get this so far, this macro successfully inputs the data from row 1 of my table into my calc sheet and saves it as a pdf. I just need help with the looping, I need it to do it for row 2 then save, row 3 then save etc...
PHP:
Sub pdfsave()
Sheets("Sheet1").Select
ActiveCell.FormulaR1C1 = "='input table'!RC[-2]"
Range("C4").Select
ActiveCell.FormulaR1C1 = "='input table'!R[-1]C[-1]"
Range("C5").Select
ActiveCell.FormulaR1C1 = "='input table'!R[-2]C"
Range("C6").Select
ActiveCell.FormulaR1C1 = "='input table'!R[-3]C[1]"
Range("C7").Select
pdfname = Range("A1").Value & Range("C4").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=pdfname, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
End Sub