LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 1
Default Help to show formula instead of value in a VBA code

Hi, I am trying to add the first eight columns, then the next eight and so on...
I was able to find out a VBA coding which helped in getting the above said in values in the cells but not the formulas. Could some one please help in correcting the below said VBA coding to get formulas instead of Values

Sub Autosum()
'to add first eight columns from Monthly tab to Total tab, then next 8 and so on
Dim Rng As Range

Set Rng = Sheets("Monthly").Range("C7:J7")
For i = 3 To 26
Sheets("Total").Cells(7, i).Value = WorksheetFunction.Sum(Rng)
Set Rng = Rng.Offset(0, 8)
Next i
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
vba code to show specified sheets in list box cavasta Excel Programming 2 September 25th 07 07:44 AM
Using Code to show all pivot items [email protected] Excel Discussion (Misc queries) 6 December 21st 06 09:50 PM
Code to show a graph cenee[_3_] Excel Programming 0 June 29th 06 09:23 PM
DataForm.Show does not work in code ufo_pilot Excel Programming 13 December 23rd 05 05:16 PM
Show/hide cells code Scottmk[_16_] Excel Programming 2 August 13th 04 12:02 AM


All times are GMT +1. The time now is 11:48 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"