copy data from sheet to another based on multiple criteria

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
389
Office Version
  1. 2016
Platform
  1. Windows
hi experts

this is the first post and I know what I request is very huge and may be very complicated but honestly, what I see in this forum there are many members help each other and I have no experience about the vba so what I want I have sheet contains many data for many customers and I have another sheet this should show the result for many standards

1 if I select the only from cell a1 the name should bring the data for this name from sheet "process

2 if I select the the cell a1 & a3 , b3 then bring all of the for this name which locates between two dates

3 if I select only a3,b3 then brings all of data for many names which locates between two dates

4 if I the cells a1,a2,a3 are empty should bring all of data

this is general explanation but I have more details in the file and how shows the result and how bring the values and calculate

if the explanation is not clear I'm ready to make clear more
I put simple sample in sheet "result" to understand how is the result
Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.

thanks in advance
 
you right about SANNY because has no balance in sheet balance but SERAJ is not it should show the value in credit because negative may you test another name has a balance in sheet balance and see what happens ,please?
about the updating you're right i was wrong
SERAJ
FROM DATETO DATE
FIRSTDEBITCREDITBALANCEcase
-1000330070016001600
DATEINVOICE NUMBERCLIENT NUMBERCLIENT NAMEDESCRIBECONDITIONDEBITCREDIT
12/31/2017CLBS-1000SERAJ-1000
01/01/2018SAL-TR-100CLBS-1000SERAJINVOICE SELLENGDEFERRED PAYMENT1000
01/15/2018SAL-TR-100CLBS-1000SERAJPECEIPT VOUCHER 120001PAID500
01/30/2018SAL-TR-100CLBS-1000SERAJPECEIPT VOUCHER 120004PAID200
01/31/2018SAL-TR-100CLBS-1000SERAJINVOICE SELLENGDEFERRED PAYMENT2300
BALANCE2600
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
there are problems if the balance for specific name is positive value should show in debit and if the value is negative then show in credit I think in post #19 explained that I no know if you see that and there is another problem when show the balance it 's gone topic header of debit and show value 500 replace it the word of debit I no know where come this value from
 
Upvote 0
Hopefully, the attached version solves both problems. Click here for the file. I forgot to mention that if you want to clear all the data, make sure that A1 and A3:B3 are blank and then click the button.
 
Upvote 0
so far you did a great work but you forgot to get in the balances within accounting as yo see the picture you should account also -1000 for SEARJ and 1200 for ELYAAS then should the value in debit 1600 not 2600 for SERAJ and 200 in debit not -1000 in credit for ELYAAS

finally I would show the total values first , debit and credit and balances from i3:l3 it shows all of the total values based on dropdown you can see in this case it brings the total based on selected names ELYAAS & SERAJ
ELYAAS
FROM DATETO DATEfirstdebitcreditbalance
200580042001800
FIRSTDEBITCREDITBALANCEcase
-1000330070016001600
DATEINVOICE NUMBERCLIENT NUMBERCLIENT NAMEDESCRIBECONDITIONDEBITCREDIT
12/31/2017CLBS-1000SERAJ-1000
01/01/2018SAL-TR-100CLBS-1000SERAJINVOICE SELLENGDEFERRED PAYMENT1000
01/15/2018SAL-TR-100CLBS-1000SERAJPECEIPT VOUCHER 120001PAID500
01/30/2018SAL-TR-100CLBS-1000SERAJPECEIPT VOUCHER 120004PAID200
01/31/2018SAL-TR-100CLBS-1000SERAJINVOICE SELLENGDEFERRED PAYMENT2300
BALANCE2600
FIRSTDEBITCREDITBALANCEcase
120025003500200200
DATEINVOICE NUMBERCLIENT NUMBERCLIENT NAMEDESCRIBECONDITIONDEBITCREDIT
12/31/2017CLBS-1004ELYAAS1200
01/19/2018SAL-TR-104CLBS-1004ELYAASINVOICE SELLENGDEFERRED PAYMENT1500
01/25/2018SAL-TR-104CLBS-1006ELYAASPECEIPT VOUCHER 120003PAID2000
02/03/2018SAL-TR-106CLBS-1004ELYAASPECEIPT VOUCHER 120006PAID10001500
BALANCE-1000
 
Upvote 0
the value in debit 1600 not 2600 for SERAJ
Can you explain how you calculated 1600 for SERAJ and why it is a debit and not a credit.
200 in debit not -1000 in credit for ELYAAS
Can you also explain how you calculated 200 for ELYAAS and why it is a credit and not a debit.

firstdebitcreditbalance
200580042001800
Where did these values come from and how are they calculated?
Please try to understand that I can't give you exactly what you want if you don't describe exactly what you want. Always refer to cell addresses and sheet names in your description.
 
Upvote 0
let's take ElYAAS it begins 1200 +1500-2000-1500 +1000=200
another account if you summing debit and subtract from summing credit then the total in debit more than total in credit then the values is positive and it supposing show in debit and if the total in debit less than credit then show the value by negative in credit
and
firstdebitcreditbalance
200580042001800
you misunderstood what i meant the total based on dropdown in this case it shows ELYAAS & SERAJ then the total are bot not only ELYAAS I want show all the total (debit,credit,first,balnces) based how many clients show the sheet short word if the sheet contains two client then summing the total of balances together from13:l3
i hope this help
 
Upvote 0
what this i no know how the file should work can you guide me what I do
 
Upvote 0
My apologies. It was the wrong link. Click here.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,850
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top