VBA Code Help

Dastnai

New Member
Joined
Oct 26, 2018
Messages
45
Hi Everyone,

I am trying to replicate this formula across column I. Starting at I2. My index with stay the same but the match will move a row. For instance the match for I3 would be L3:BT3. Here is the code I have:

Thank you for your help



Range("I2").Select
Selection.FormulaArray = _
"=index($L$1:$BT$1,match(True,isnumber($L$2:$BT$2),0))"
Range("I2").Select
Selection.NumberFormat = "General"
Range("I2").Select
Selection.FormulaArray = _
"=INDEX(R1C12:R1C72,MATCH(TRUE,ISNUMBER(R2C12:R2C72),0))"
Range("I2").Select
End Sub
 

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.
how about
Code:
Range("I2").FormulaArray = _
   "=index($L$1:$BT$1,match(True,isnumber($L2:$BT2),0))"
Range("I2:I10").Filldown
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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