LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"