Hot Topics

We regret to inform you that the PC Advisor Forums are now closed, and you are unable to post new comments or conversations. If you have a question about the forums, please contact us.

excel 2010 transfer money atround

  Anon-335228 20:43 12 Aug 2014
Locked
Answered

I have a simple spread sheet when I list all my income and all my outgoings and balance at the bottom.

What I would like to do is add a macro so I could right click on one cell enter the amount I wish to take out, transfer it to another cell and have the balances updated automatically. E.G. In cell (A1) I have bank credit of £200 I want to pay a gas bill(A2) of £36 Click on the bank account enter the £36 then click on the Gas Bill click again and the money is transferred leaving totals of £164 in the bank account and 36 in the gas bill account.

How would I write one please.

Thanks for looking.

  Anon-218616 21:24 12 Aug 2014

Why a macro?

I have a simple 5 column method. A B C D E

A is for the date

B is for the description

C is for Debits

D is for Credits

E is for the Running Balance

so using your figures of a credit balance of £200 and a gas bill of £36 mine would be:

Row 1, A to E has the column headings Date, Description, Debits Credits, Running Balance.

B2 Credit Balance

E2 £200

B3 Gas Bill

C3 -£36

D3 £0

E3 =SUM(E2+C3+D3)

  Anon-335228 13:09 13 Aug 2014

Thanks for your help, I had a macro (from this site) some time ago, but have lost it, due to (1) Harddrive crash (2) Change from Office 2003 to Office 2010 and for some reason the macro did not copy across.

Terry

  Anon-281249 14:35 13 Aug 2014

We all miss Vog.

  Anon-335228 10:33 17 Aug 2014

I have just found the Macro, I used- I seem to remember it come from Lotvic (I may be mistaken) originally.

I re-print it for any one who wishes to use it.

Written in Visual Basic, operated by double left click

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

Dim MoveAmount As Variant, MoveTo As Range

Cancel = True

MoveAmount = Application.InputBox("Enter amount to transfer", Type:=1)

If TypeName(MoveAmount) = "Boolean" Then Exit Sub

Set MoveTo = Application.InputBox("Select the destination Cell", Type:=8)

MoveTo.Value = MoveTo.Value + MoveAmount

Target.Value = Target.Value - MoveAmount

End Sub

Terry

  Anon-218616 16:00 17 Aug 2014

Not me, wish it had been :)

pleased you got it sorted anyways.

1x1 pixel
Elsewhere on IDG sites

£129 Roku Streambar Aims to Complete the Home Entertainment Experience

Apple iMac 2020 review

No, iOS 14 widgets are not spying on your iPhone

Google Pixel 5 : date de sortie, prix et autres rumeurs

/forum/helproom-1/excel-2010-transfer-money-atround-4487828/