Copy/Paste based on matched value that will change every second or so?

vbagivesmeaheadache

New Member
Joined
Dec 2, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I'm in over my head with VBA! Please help.

I have a model with two paths. It iterates column data through one of two models based on values (I successfully VBA'd this part: go me! It took me 12 hours: oh no!)
I have two rows at the top of an output sheet that contain the current output of each model. As the inputs change about every second, the outputs do as well. (about, because the data isn't so that every-other column goes to one model or another, three could go to model 1 and then 5 could go to model 2 and so forth).

What I want is VBA to repeatedly look at cells AO3 and AO4 (since they will be updating as the model runs), find the corresponding values in AO6-AO35, and paste the values of the output in the correct row. AO3 and AO4 will always have the correct segment ID number--those change as the outputs change.

Screenshot for clarity..
I've not attempted to write any VBA for this yet because I can't find anything that matches and iterates and pastes.

Does anyone have any advice or code to point me to?

vbahelp.JPG
 
the AO3 and AO4 values and rows are directly linking to output cells from the models, which are excel formulas in other sheets. I can't influence that part, but I need to call those cells over and over again as the models iterate.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,978
Messages
6,122,545
Members
449,089
Latest member
davidcom

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