Macro to pull all amounts into a message box or userform and ask me which ones to edit etc

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,197
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I have a list of direct debits,
sometimes I need to edit or adjust the amount i'm paying for one or more of them for that month
I need a macro that can ask me which ones I want to change and by how much and then add reduce the following months amount by that amount?

So here in detail what I need,

Below is an example of what I have

So here's what I need the macro to do,
I'm going to say messagebox but if its easier to do it with userform please just guide me through.
run macro
Macro looks along row 36 and in Columns AO,AQ,AS,AU,AW to see what ones have a values in them
(some might be minus values some will be blank, if it helps the first black cell out of them means theres not anymore after so if AS="" then AU & AW must also be blank However AV. AT or any other cell might not)
So Messagebox says "Which Value/Values would you like to change?)
Messagebox Shows List of all the values and has an input box next to it for me to add the new amounts
I then press OK
Macro changes all the cells I picked to the amounts I said,
Macro then adjust the values in Row 37 to show the changes I made so 36+37 still = the same
so if I pick AO36 and change it from 10000 to 5000 then the 5000 gets added to AO37
and so on.

I hope thats clear really stuck on this please help if you can thanks
Tony



ROWS/COLUMNSAOAPAQARASATAUAVAW
3610000500020001000500
3710000500020001100550
Result if a chose AQ36 as row tow change and asked it to be 3000
363000
377000

<tbody>
</tbody>
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi Tony,

to make it easier for you to differentiate which direct debit you are changing, is there a header row with names for the DD? Otherwise you will only see figures.

a. One option is to create a userform for you to do this, as in a messagebox you cannot have combobox or something similar.

b. An alternative would be that you click on a cell (say AQ36), which then immediately pops up a messagebox to make a change to that cell only (and the corresponding AQ37 cell)

What would be you preference? b. is very easy to code and for you to maintain. a. looks pretty and can be run from anywhere in the workbook, but takes more setup and coding.
 
Upvote 0

Forum statistics

Threads
1,215,646
Messages
6,126,002
Members
449,279
Latest member
Faraz5023

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