Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default VBA Totaling

Hello from Steved

Please how does one tell Cell G9 to add Cells G6 and G7 minus G8 to give the
answer in Visual Basic Application.

Thankyou.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default VBA Totaling


Not too hard...
Sub AddThemUp()
Dim dblAnswer As Double
dblAnswer = Range("G6").Value + Range("G7").Value - Range("G8").Value
Range("G9").Value = dblAnswer
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"Steved"
wrote in message
Hello from Steved

Please how does one tell Cell G9 to add Cells G6 and G7 minus G8 to give the
answer in Visual Basic Application.

Thankyou.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default VBA Totaling

Here's another way:

Sub AddThemUp1()
Range("G9").Formula = "=Sum(G6,G7,-G8)"
End Sub

"Steved" wrote in message
...
Hello from Steved

Please how does one tell Cell G9 to add Cells G6 and G7 minus G8 to give
the
answer in Visual Basic Application.

Thankyou.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default VBA Totaling

Hello from Steved

I thankyou Both.

"Steved" wrote:

Hello from Steved

Please how does one tell Cell G9 to add Cells G6 and G7 minus G8 to give the
answer in Visual Basic Application.

Thankyou.

Reply
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
totaling $$ dd Excel Discussion (Misc queries) 1 January 1st 10 12:14 AM
Sub-Totaling tamxwell Excel Discussion (Misc queries) 2 November 10th 05 02:40 PM
Sub-Totaling tamxwell Excel Worksheet Functions 1 November 10th 05 01:33 AM
totaling to a different sheet -Brian-H- Excel Discussion (Misc queries) 1 September 8th 05 07:48 AM
Help with totaling a columns in VBA Chris Excel Programming 1 June 23rd 05 06:33 PM


All times are GMT +1. The time now is 08:59 PM.

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"