Fetching and looping through a range ...

duke1509

New Member
Joined
Apr 1, 2016
Messages
8
Hi Everyone,

I have struggling with finding an easy way to automate this process, but need some advise, as there is still some limit to my VBA knowledge. I have a calculator that works out prices which is a sheet in my workbook, and a list on another sheet in which i need to place the prices, so below I recorded the macro for the first line, but now I do not know how to loop it so that it does it automatically through rows 2 - 800001 on the "wiro" sheet. If you have an easier suggestion I am all open...

I would appreciate the help, thanks for the consideration and time.

Kind Regards
Duke

Code:
Calculate_Sheet Macro
'
    Sheets("Order").Select
    Range("F4").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-2]C[-3]"
    Range("F5").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-3]C[-2]"
    Range("F6").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-4]C[-1]"
    Range("F7").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-5]C"
    Range("F8").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-6]C[1]"
    Range("F9").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-7]C[2]"
    Range("F10").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-8]C[3]"
    Range("F11").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-9]C[4]"
    Range("F12").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-10]C[5]"
    Range("F13").Select
    ActiveCell.FormulaR1C1 = "='WiroA3 C100gsm I100gsm 20-22pp '!R[-11]C[6]"
    Range("F14").Select
    Selection.Copy
    Sheets("WiroA3 C100gsm I100gsm 20-22pp ").Select
    Range("M2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,833
Messages
6,127,157
Members
449,367
Latest member
w88mp

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