Help with VBA to insert formulaI

Frank3923

Board Regular
Joined
Jan 20, 2003
Messages
244
I have a formula which I want to VBA to insert into a range of cells.
I want to search Column ("G") for the word "Final", then offset -2 columns, and 1 row, insert the formula, drop down, another row and insert the formula again, and then continue looking in Column ("G") for another instance of the value, "Final", and continue to insert an additonal 2 rows of formulas, and continue on.

My problem, is understanding how to change the row references, using vba, as the rows are dynamic in range.

=INDEX(C8:L8,1,MAX(IF(C8:L8<>"",COLUMN(C8:L8)))-COLUMN(C8)+1)

I would appreciate any help, in understanding how to accomplish this.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

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