Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Flexability
Hello,
I am looking to make this macro a little more flexible, if I am to add or remove data I want this to preform the same function. can anyone help me adjust this so this is possible Thanks for the assistance Sub Percentages() ' ' Percentages Macro ' Macro recorded 9/30/2009 by e447207 ' Cells.find(What:="Total", After:=ActiveCell, LookIn:=xlValues, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate Range("E7").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E15").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E30").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E33").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E45").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E69").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E80").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E97").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E103").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E111").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" ActiveWindow.SmallScroll Down:=6 Cells.FindNext(After:=ActiveCell).Activate Range("E113").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E132").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E164").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E179").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E181").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E193").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E212").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E216").Select ActiveCell.FormulaR1C1 = "=RC[-1]/R218C4" Cells.FindNext(After:=ActiveCell).Activate Range("E218").Select Selection.FormulaR1C1 = "=" Range("E218").Select ActiveCell.FormulaR1C1 = "=SUM(R[-212]C:R[-1]C)" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |