Logo
DiS Needs You: Save our site »
  • Logo_home2
  • Records
  • In Depth
  • In Photos
  • Blog
  • Podcast
  • Search
  • Community
  • Records
  • In Depth
  • Blog
  • Community

THIS SITE HAS BEEN ARCHIVED AND CLOSED.

Please join the conversation over on our new forums »

If you really want to read this, try using The Internet Archive.

Boards

Music Social More…

DiS VBA club

cat_race [Edit] [Delete] 12:40, 12 May '14

obviously i'm a master of excel but i'm now starting to learn VBA and really enjoying it. total beginner though, just did this

Sub ExchangeAllocation()
'
' ExchangeAllocation Macro
'
'
'
Range("A1").Select
ActiveCell.Offset(1, 0).Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
Sheets("Sheet2").Select
Range("E1:G1").Select
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Columns("T:W").EntireColumn.AutoFit
ActiveCell.Offset(1, 0).Select

Do Until IsEmpty(ActiveCell.Offset(0, -11))

ActiveCell = WorksheetFunction.Average(Range(ActiveCell.Offset(0, -11), ActiveCell.Offset(0, -9))) * Range("T1")
Selection.NumberFormat = "0.00"
ActiveCell.Offset(1, 0).Select

Loop



End Sub

share with me your triumphs people!


Drowned in Sound
  • DROWNED IN SOUND
  • HOME
  • SITE MAP
  • NEWS
  • IN DEPTH
  • IN PHOTOS
  • RECORDS
  • RECOMMENDED RECORDS
  • ALBUMS OF THE YEAR
  • FESTIVAL COVERAGE
  • COMMUNITY
  • MUSIC FORUM
  • SOCIAL BOARD
  • REPORT ERRORS
  • CONTACT US
  • JOIN OUR MAILING LIST
  • FOLLOW DiS
  • GOOGLE+
  • FACEBOOK
  • TWITTER
  • SHUFFLER
  • TUMBLR
  • YOUTUBE
  • RSS FEED
  • RSS EMAIL SUBSCRIBE
  • MISC
  • TERM OF USE
  • PRIVACY
  • ADVERTISING
  • OUR WIKIPEDIA
© 2000-2025 DROWNED IN SOUND