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
 

Forum statistics

Threads
1,081,793
Messages
5,361,325
Members
400,627
Latest member
Mcomeaux

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top