Macro for creating message box at very particular intervals

Bowhaven

New Member
Joined
Nov 25, 2016
Messages
6
Hello everyone,

Firstly, I understand that this coding might be a bit of faff so I'm more than happy to do the grunt work myself if someone could show me the barebones of how to do it.

I would like to create a macro which shows a message box when specific rows in column B are filled. The specific rows would be determined by the cells in columns E:M in rows 6, 11, 16, and 21. Due to the nature of my work, all these numbers could be different each time I use this sheet so they all need to be customisable. Apologies if it isn't very clear in the screenshot below but the merged cells don't show up.

Regarding how the numbers in the specific cells match up to the message boxes:

In Rack 1, Spike 1, Run 1, if the number is 6 then I would like the message box to pop up when B7 is filled. Then if Rack 1, Spike 1, Run 2 has the number 5 then I would like the box to pop up at B12. I would like to extend this pattern across the entirety of all 4 racks (although sometimes only 1,2, or 3 racks would be used). So the cell at which the message box pops up for each subsequent run is dependent on the numbers of all previous runs.

The reason I've distinguished between runs/spikes/racks is because I would like a different message at the end of each run, at the end of each spike (so third run) and at the end of each rack (so third spike).

I've included a screenshot for clarity but please let me know if you require any further information and I will quickly provide it!

Thanks for taking the time to read this,

Chris


Excel 2013 32 bit
A
B
C
D
E
F
G
H
I
J
K
L
M
N
1
Racking PlanBarcode Scan
2
1​
3
2​
Rack 1​
4
3​
Spike 1​
Spike 2​
Spike 3​
5
4​
Run 1Run 2Run 3Run 1Run 2Run 3Run 1Run 2Run 3
6
5​
7
6​
8
7​
Rack 2​
9
8​
Spike 1​
Spike 2​
Spike 3​
10
9​
Run 1Run 2Run 3Run 1Run 2Run 3Run 1Run 2Run 3
11
10​
12
11​
13
12​
Rack 3​
14
13​
Spike 1​
Spike 2​
Spike 3​
15
14​
Run 1Run 2Run 3Run 1Run 2Run 3Run 1Run 2Run 3
16
15​
17
16​
18
17​
Rack 4​
19
18​
Spike 1​
Spike 2​
Spike 3​
20
19​
Run 1Run 2Run 3Run 1Run 2Run 3Run 1Run 2Run 3
21
20​
22
21​
23
22​
24
23​
25
continues…

<tbody>
</tbody>
Sheet: Sheet1

<tbody>
</tbody>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Apologies for the lack of clarity and simplicity in my original post, I have now modified my file to make my question simpler:

R3:R38 contain ascending numbers (R3 being the lowest). I'm looking for a macro which causes a message box to appear when the corresponding rows in column B are filled. For example, if R3 contains "7" then when B7 is filled the message box pops up.

As a bonus part, I was wondering then how difficult it would be to make it so the every 3rd cell in the R3:R38 range (so R5, R8 etc) causes a message box to pop up that's different from the one for R3, R4, R6, R7 etc.

Many thanks!
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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