View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
khurram_razaq khurram_razaq is offline
external usenet poster
 
Posts: 10
Default Creating a loop in a Macro to do through data

Hi,

I am trying to create a Macro in Excel to go through a list of names on one
sheet, and starting from the top pick one up at a time and perform the action
prescribed by the macro. I need some help with some coding in Excel. I have
got the action setup in the macro, however I am unable to get the macro to
change what its looking at.

See code below, in this line of Code (ActiveCell.FormulaR1C1 =
"=Entities!R[-3]C[-1]"), I would like it to change the cell each time its
performed the action and keep changing and continuing the action until it
arrives at a blank cell.

Sub EMEA_Reporting()
'
' EMEA_Reporting Macro
' Macro recorded 01/04/2009 by KRazaq
'

'
ActiveCell.FormulaR1C1 = "=Entities!R[-3]C[-1]"
Range("B6").Select
Sheets("Base").Select
Sheets("Base").Copy Befo=Sheets(1)
Selection.ShapeRange.Delete
Cells.Select
ActiveWorkbook.BreakLink Name:="C:\Hyperion\SmartView\bin\HsTbar.xla",
Type _
:=xlExcelLinks
End Sub


Thanks for you help.

Khurram