LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default is this vba code correct or is there a more simple way to do this ?

Hi,

I'am a novice on vba programming and constructed this code:

Sheets("staffelberekening").Range("I27") = Application.Sum(Sheets
("toekomst_oud").Columns("P:P")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I28") = Application.Sum(Sheets
("toekomst_oud").Columns("AB:AB")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I29") = Application.Sum(Sheets
("toekomst_oud").Columns("AF:AF")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I30") = Application.Sum(Sheets
("toekomst_oud").Columns("AJ:AJ")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I31") = Application.Sum(Sheets
("toekomst_oud").Columns("AN:AN")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I32") = Application.Sum(Sheets
("toekomst_oud").Columns("AR:AR")) + Range("D12") + Range("D13")
Sheets("staffelberekening").Range("I33") = Application.Sum(Sheets
("toekomst_oud").Columns("AV:AV")) + Range("D12") + Range("D13")

This works but it seems cumbersome. Is this the correct way to do this or....
Thanks,
Jean-Pierre


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1
 
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
How do I correct an incorrect total from a simple formula? DC Excel Discussion (Misc queries) 6 May 21st 08 10:48 PM
Code is not correct Pat Excel Programming 10 April 6th 05 02:03 AM
Help to correct code Pat Excel Programming 6 December 29th 04 05:02 PM
Please help correct a simple error lwhite New Users to Excel 1 December 9th 04 09:39 PM
Can you help with the correct translation of this code? Just For Fun... Excel Programming 0 September 30th 04 06:16 AM


All times are GMT +1. The time now is 01:23 PM.

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

About Us

"It's about Microsoft Excel"