In each column autofill certain number of functions to reduce calculation

Aquinax

New Member
Joined
Nov 5, 2015
Messages
2
Hello,

to illustrate the question:

Excel.png


In columns AA, BB, CC, etc. there are to be inserted only a given number of functions, which are specified in the small table on the right. This in order to reduce the overall amount of calculation as the actual table is rather large. Thank you!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
The question is solved. All credits to Kaper from excelforum.com
Code:
<code>Sub test2()
Dim i As Long, cell As Range
Application.ScreenUpdating = False
For i = 7 To Cells(1, Columns.Count).End(xlToLeft).Column 'headers in row 1, column G = 7
  Set cell = Columns(4).Find(what:=Cells(1, i), lookat:=xlWhole, LookIn:=xlValues) 'look into column D = 4, values from row 1
  If cell Is Nothing Then
    MsgBox "not found " & Cells(1, i) & " in column A"
  Else
    Cells(2, i).AutoFill Cells(2, i).Resize(cell.Offset(0, 1).Value, 1) 'formula is in row 2
  End If
Next i
End Sub</code>
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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