PC Review


Reply
Thread Tools Rate Thread

calculating balances

 
 
Yossy
Guest
Posts: n/a
 
      18th Dec 2008
Please all help totally appreciated. I want to add values to another value in
another cell but want to see the values as they add up.

E.g
Cell G3 = E26+200+500
Gell G20 = 100
I want to add G20 to G3: Is it possible to leave the values as G3=
E26+200+500+100 and even show the new value added of 100. THe code below
just sums up the total without showing the breakdown of values added so far.

With .Range("G3")
.Value = .Value + ws.Range("G20").Value
End With
With .Range("G10")
.Value = .Value + ws.Range("G21").Value
End With

Again is it possible to have G3 =E26+200+500+100 in G3 once code is
executed. This way I see the values added not the whole added nos. This I
need for G10 too when I add G21 value.

Thanks so much for helping out.

 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      18th Dec 2008
Hi

This should do it for the first cell

With .Range("G3")
formStr = .Formula
.Formula = formStr & "+" & ws.Range("G20").Value
End With

Regards,
Per

On 18 Dec., 01:09, Yossy <Yo...@discussions.microsoft.com> wrote:
> Please all help totally appreciated. I want to add values to another value in
> another cell but want to see the values as they add up.
>
> E.g
> Cell G3 = E26+200+500
> Gell G20 = 100
> I want to add G20 to G3: Is it possible to leave the values as G3=
> E26+200+500+100 *and even show the new value added of 100. THe code below
> just sums up the total without showing the breakdown of values added so far.
>
> With .Range("G3")
> * * * * * * * * * * * * .Value = .Value + ws.Range("G20").Value
> * * * * * * * * * * * * End With
> * * * * * * * * * * * * With .Range("G10")
> * * * * * * * * * * * * .Value = .Value + ws.Range("G21").Value
> * * * * * * * * * * * * End With
>
> Again is it possible to have G3 =E26+200+500+100 in G3 once code is
> executed. This way I see the values added not the whole added nos. This I
> need for G10 too when I add G21 value.
>
> Thanks so much for helping out.


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      18th Dec 2008
Not quite sure what you want but these should cover it

Sub showvalueandsumifg3TEXT()
MV = Range("g3") & "+" & Range("g20")
MsgBox MV
Range("G3") = MV
End Sub
Sub showvalueandsumifg3FORMULA()
MV = Range("g4").Formula & "+" & Range("g20")
MsgBox MV
Range("G5") = MV
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Yossy" <(E-Mail Removed)> wrote in message
news:2744B3EA-CEB9-4322-BCAA-(E-Mail Removed)...
> Please all help totally appreciated. I want to add values to another value
> in
> another cell but want to see the values as they add up.
>
> E.g
> Cell G3 = E26+200+500
> Gell G20 = 100
> I want to add G20 to G3: Is it possible to leave the values as G3=
> E26+200+500+100 and even show the new value added of 100. THe code below
> just sums up the total without showing the breakdown of values added so
> far.
>
> With .Range("G3")
> .Value = .Value + ws.Range("G20").Value
> End With
> With .Range("G10")
> .Value = .Value + ws.Range("G21").Value
> End With
>
> Again is it possible to have G3 =E26+200+500+100 in G3 once code is
> executed. This way I see the values added not the whole added nos. This I
> need for G10 too when I add G21 value.
>
> Thanks so much for helping out.
>


 
Reply With Quote
 
Yossy
Guest
Posts: n/a
 
      18th Dec 2008
thanks, I really appreciate it.

"Per Jessen" wrote:

> Hi
>
> This should do it for the first cell
>
> With .Range("G3")
> formStr = .Formula
> .Formula = formStr & "+" & ws.Range("G20").Value
> End With
>
> Regards,
> Per
>
> On 18 Dec., 01:09, Yossy <Yo...@discussions.microsoft.com> wrote:
> > Please all help totally appreciated. I want to add values to another value in
> > another cell but want to see the values as they add up.
> >
> > E.g
> > Cell G3 = E26+200+500
> > Gell G20 = 100
> > I want to add G20 to G3: Is it possible to leave the values as G3=
> > E26+200+500+100 and even show the new value added of 100. THe code below
> > just sums up the total without showing the breakdown of values added so far.
> >
> > With .Range("G3")
> > .Value = .Value + ws.Range("G20").Value
> > End With
> > With .Range("G10")
> > .Value = .Value + ws.Range("G21").Value
> > End With
> >
> > Again is it possible to have G3 =E26+200+500+100 in G3 once code is
> > executed. This way I see the values added not the whole added nos. This I
> > need for G10 too when I add G21 value.
> >
> > Thanks so much for helping out.

>
>

 
Reply With Quote
 
Yossy
Guest
Posts: n/a
 
      18th Dec 2008
thanks, i really appreciate it.

"Don Guillett" wrote:

> Not quite sure what you want but these should cover it
>
> Sub showvalueandsumifg3TEXT()
> MV = Range("g3") & "+" & Range("g20")
> MsgBox MV
> Range("G3") = MV
> End Sub
> Sub showvalueandsumifg3FORMULA()
> MV = Range("g4").Formula & "+" & Range("g20")
> MsgBox MV
> Range("G5") = MV
> End Sub
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Yossy" <(E-Mail Removed)> wrote in message
> news:2744B3EA-CEB9-4322-BCAA-(E-Mail Removed)...
> > Please all help totally appreciated. I want to add values to another value
> > in
> > another cell but want to see the values as they add up.
> >
> > E.g
> > Cell G3 = E26+200+500
> > Gell G20 = 100
> > I want to add G20 to G3: Is it possible to leave the values as G3=
> > E26+200+500+100 and even show the new value added of 100. THe code below
> > just sums up the total without showing the breakdown of values added so
> > far.
> >
> > With .Range("G3")
> > .Value = .Value + ws.Range("G20").Value
> > End With
> > With .Range("G10")
> > .Value = .Value + ws.Range("G21").Value
> > End With
> >
> > Again is it possible to have G3 =E26+200+500+100 in G3 once code is
> > executed. This way I see the values added not the whole added nos. This I
> > need for G10 too when I add G21 value.
> >
> > Thanks so much for helping out.
> >

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Running balances John W. Vinson Microsoft Access 0 15th Jan 2009 07:16 PM
Balances GA85 Microsoft Excel Misc 6 15th Nov 2008 10:17 PM
Calculating Average Daily Balances jacobfarino@gmail.com Microsoft Excel Programming 1 13th Nov 2008 06:51 AM
excel template for calculating trial balances and adjusting entri. =?Utf-8?B?eWVzdGVyZGF5dG9kYXkxMQ==?= Microsoft Excel Worksheet Functions 2 24th Nov 2004 06:25 PM
How to link endings balances to beginning balances on different sh =?Utf-8?B?anVkeXNraXNrZA==?= Microsoft Excel Worksheet Functions 1 28th Oct 2004 07:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.