Auto fill formula VBA with constant rule

garypea123

Board Regular
Joined
Mar 16, 2020
Messages
221
Office Version
  1. 365
Platform
  1. Windows
Good Morning,

New to VBA but becoming more and more accomplished with your guys help :)

So here is my question regarding my next script.

From Column E this is a data export (so not changeable from report). The lines will change each hour potentially, but the constant:

The word ordered in Column F, and a name in Column E (to the left).

Now what I want in column B which:

Will return a blank if the adjacent result in column F is ordered.
Will return the name of the person in Column E if (to the left of ordered) until the next ordered in the further down the column. And then repeat until the end of the data in Column F.

I have provided an example of what it should look like.

I hope this makes sense.

Test.PNG
 
Perfect, makes absolute sense and now I understand why this was not working.

Either change the code name in VBA editor or apply a slightly different script with Worksheets("sheetname").
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Exactly - I like using codenames because it stops users from changing the name and screwing up the script ;)
 
Upvote 0
Yes, that makes sense completely, and definitely something I should consider moving forward. It just adds that little bit of a fail safe as none of my guys will know how to change a code name :)

This site is great :) and thank you for your help. I learn so much.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,936
Latest member
almerpogi

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