"How the macro for beside excel" makes no sense whatsoever.
Sub Like_So()
Dim x As Long, i As Long, j As Long
x = Cells(3, 3).Value
j = 1
For i = 1 To WorksheetFunction.Ceiling(Cells(3, 3), 40) / 40
Cells(3, 1).Value = j
If j + 39 > x Then
Cells(3, 3).Value = x
Else
Cells(3, 3).Value = j + 39
End If
ActiveSheet.ExportAsFixedFormat xlTypePDF, ThisWorkbook.Path & "\" & "Bags From " & Cells(3, 1).Value & " To " & Cells(3, 3).Value & ".pdf"
j = j + 40
Next i
End Sub
Exactly! When folks ask a question an answer is meant to be posted, not "AI did it for me so thanks for nothing."For other people with the same or similar problem that come here expecting to find a solution, just like you did, could you be so kind and show the solution for them.
That would be very kind of you and also very much appreciated.
Thank you very much.
What he actually said was "I believe that the abominable deterioration of ethical standards stems primarily from the mechanisation and depersonalisation of our lives, a disastrous byproduct of science and technology. Nostra culpa!" ... and rightlly so.Thanks. I should have "snoped" it. Changed accordingly