#1   Report Post  
Posted to microsoft.public.excel.misc
nba nba is offline
external usenet poster
 
Posts: 11
Default Summing like data

I have data in the following columns:
a b c d e f
g h
date name unit start end booking payment
balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100 $900
01/07/09 John Smith 1 1/10/09 10/10/09 $500 $400
15/09/09 John Smith 1 1/10/09 10/10/09 $400 paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000 $1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000 paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200 paid

I need to create a balance sheet for each booking calculating the amount
outstanding. Each time a payment is made a new line is created showing the
date and the amount paid. This is then subtracted from the initial booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to sort it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Summing like data

If your data are sorted by name and date like in your example, then try this:

=INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW()))

Or, if you insist on displaying "paid" instead of 0 balance:

=IF(INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW()))=0 ,"paid",INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW())))

Regards,
Stefi

€žnba€ť ezt Ă*rta:

I have data in the following columns:
a b c d e f
g h
date name unit start end booking payment
balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100 $900
01/07/09 John Smith 1 1/10/09 10/10/09 $500 $400
15/09/09 John Smith 1 1/10/09 10/10/09 $400 paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000 $1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000 paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200 paid

I need to create a balance sheet for each booking calculating the amount
outstanding. Each time a payment is made a new line is created showing the
date and the amount paid. This is then subtracted from the initial booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to sort it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.

  #3   Report Post  
Posted to microsoft.public.excel.misc
nba nba is offline
external usenet poster
 
Posts: 11
Default Summing like data

Hi Stefi,

I have tried your formula and it works to a point but when there is more
than one booking for the same person on different dates then the formula
doesn't calculate the correct amount.
What we need to match is the name, unit, start and end. (columns b, c, d, e
in the data below). I have added more data to show the example.

Also once the booking is "paid" I want every balance for that booking to
show "paid". see the last 2 rows of data below. Can this be done?

"Stefi" wrote:

If your data are sorted by name and date like in your example, then try this:

=INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW()))

Or, if you insist on displaying "paid" instead of 0 balance:

=IF(INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW()))=0 ,"paid",INDIRECT("F"&MATCH(B2,B:B,0))-SUM(INDEX(G:G,MATCH(B2,B:B,0)):INDEX(G:G,ROW())))

Regards,
Stefi

€žnba€ť ezt Ă*rta:

I have data in the following columns:
a b c d e f g h
date name unit start end booking payment balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100 $900
01/07/09 John Smith 1 1/10/09 10/10/09 $500 $400
15/09/09 John Smith 1 1/10/09 10/10/09 $400 paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000 $1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000 paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200 paid
01/10/09 John Smith 9 1/12/09 5/12/09 $900 $100 paid
01/11/09 John Smith 9 1/12/09 5/12/09 $800 paid


I need to create a balance sheet for each booking calculating the amount
outstanding. Each time a payment is made a new line is created showing the
date and the amount paid. This is then subtracted from the initial booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to sort it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Summing like data

This is now the whole line of code and I am getting a syntax error on the
line.

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Backup\Sales\Work\"&inval&"(" &
strSH & ")" & Format(Now, " dd-mm-yy hh-mm-ss") & ".xls",
FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False

--
Thank You in Advance
Ed Davis
"nba" wrote in message
...
I have data in the following columns:
a b c d e f
g h
date name unit start end booking payment
balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100 $900
01/07/09 John Smith 1 1/10/09 10/10/09 $500
$400
15/09/09 John Smith 1 1/10/09 10/10/09 $400
paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000 $1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000
paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200
paid

I need to create a balance sheet for each booking calculating the amount
outstanding. Each time a payment is made a new line is created showing the
date and the amount paid. This is then subtracted from the initial booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to sort
it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Summing like data

This is another thread, but the answer is that a space has been inserted
manually before and after InVal. VB editor sometimes doesn't recognize & as
an operator that must be separated by a space from the operands:

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Backup\Sales\Work\" & inval &
"(" & _
strSH & ")" & Format(Now, " dd-mm-yy hh-mm-ss") & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Stefi


€žEd Davis€ť ezt Ă*rta:

This is now the whole line of code and I am getting a syntax error on the
line.

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Backup\Sales\Work\"&inval&"(" &
strSH & ")" & Format(Now, " dd-mm-yy hh-mm-ss") & ".xls",
FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False

--
Thank You in Advance
Ed Davis
"nba" wrote in message
...
I have data in the following columns:
a b c d e f
g h
date name unit start end booking payment
balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100 $900
01/07/09 John Smith 1 1/10/09 10/10/09 $500
$400
15/09/09 John Smith 1 1/10/09 10/10/09 $400
paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000 $1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000
paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200
paid

I need to create a balance sheet for each booking calculating the amount
outstanding. Each time a payment is made a new line is created showing the
date and the amount paid. This is then subtracted from the initial booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to sort
it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Summing like data

Sorry this post was an accident.


--
Thank You in Advance
Ed Davis
"Stefi" wrote in message
...
This is another thread, but the answer is that a space has been inserted
manually before and after InVal. VB editor sometimes doesn't recognize &
as
an operator that must be separated by a space from the operands:

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Backup\Sales\Work\" & inval &
"(" & _
strSH & ")" & Format(Now, " dd-mm-yy hh-mm-ss") & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Stefi


"Ed Davis" ezt írta:

This is now the whole line of code and I am getting a syntax error on the
line.

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Backup\Sales\Work\"&inval&"("
&
strSH & ")" & Format(Now, " dd-mm-yy hh-mm-ss") & ".xls",
FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False

--
Thank You in Advance
Ed Davis
"nba" wrote in message
...
I have data in the following columns:
a b c d e f
g h
date name unit start end booking
payment
balance
01/06/09 John Smith 1 1/10/09 10/10/09 $1000 $100
$900
01/07/09 John Smith 1 1/10/09 10/10/09 $500
$400
15/09/09 John Smith 1 1/10/09 10/10/09 $400
paid
01/04/09 Mary Jane 4 1/11/09 20/11/09 $2000 $1000
$1000
21/05/09 Mary Jane 4 1/11/09 20/11/09 $1000
paid
01/10/09 Fred Mac 2 1/12/09 02/12/09 $200 $200
paid

I need to create a balance sheet for each booking calculating the
amount
outstanding. Each time a payment is made a new line is created showing
the
date and the amount paid. This is then subtracted from the initial
booking
and you are left with the remaining balance owing or the text "paid".

I have tried nested if statements but it is getting too confusing to
sort
it
out as the number of payments can vary from 1 to many payments.

Can you help simplify a formula to solve this problem.






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
Summing up Data Tom K[_2_] Excel Worksheet Functions 10 January 16th 09 02:57 AM
Summing data by month Valerie Excel Discussion (Misc queries) 5 January 9th 09 01:59 PM
summing data david72 Excel Discussion (Misc queries) 1 May 17th 06 04:15 AM
summing data Roxy Excel Worksheet Functions 3 September 22nd 05 10:58 PM
Summing data yesac142 Excel Discussion (Misc queries) 6 June 20th 05 01:47 PM


All times are GMT +1. The time now is 02:20 AM.

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"