VBA macro increase multiple cell value when printing

Qerunk

New Member
Joined
Jun 12, 2024
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Dear All

I need your help. Kindly refer image.
TQ in advance
 

Attachments

  • Macro.jpg
    Macro.jpg
    34.1 KB · Views: 36

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I hae zero idea what you are expecting from VBA.
If you want to use a language translator use www.deepl.com to translate your thoughts into English and then maybe can figur out what you want to achieve.
"How the macro for beside excel" makes no sense whatsoever.
 
Upvote 0
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.
 
Upvote 0
When I started with excel and when I had to search for a solution I was all too happy if I saw a post with a headline that I was sure to give me my solution.
How disappointed can one be when there was a last post that said: "I found a solution". But no solution in the post!!!!!

I felt obliged to make sure that if someone came here to get a solution they would have a working answer and not be disappointed.
Probably not near as sophisticated as Chat but it works on a test workbook.
Code:
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
 
Upvote 1
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.
Exactly! When folks ask a question an answer is meant to be posted, not "AI did it for me so thanks for nothing."
 
Upvote 0
Thanks. I should have "snoped" it. Changed accordingly
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.

I suppose some droll troll dumbed it down to make appear more appealing to a generation who belive anything they see online is absolute truth and then never go verify it but that's not you. You did verify it was false and learned accrdingly but I am still in the dark with this faile writing problem.
 
Upvote 0

Forum statistics

Threads
1,221,565
Messages
6,160,517
Members
451,655
Latest member
rugubara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top