Merge data on userform for each sheet based on multiple columns.

Maklil

Board Regular
Joined
Jun 23, 2022
Messages
193
Office Version
  1. 2019
Platform
  1. Windows
Hi Guys,
I expect data could reach for about 12000 rows for each sheet.
so I would show this report on userform as in picture when there are no dates in TB1,TB2.


mkl.PNG



mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023MMUY7000MVSOOIL AS-100PAIDASDFT SAFE20.00160.003,200.00
320/08/2023MMUY7000MVSOOIL AS-101PAIDASDFT SAFE20.00180.003,600.00
4TOTAL6,800.00
520/08/2023MMUY7001MVSOOIL AS-102PAIDASDFT SAFE40.00155.006,200.00
620/08/2023MMUY7001MVSOOIL AS-103PAIDASDFT SAFE20.00190.003,800.00
7TOTAL10,000.00
821/08/2023MMUY7002MVSOOIL AS-103NOT PAID25.00190.004,750.00
9TOTAL4,750.00
1021/08/2023MSSOOIL AS-103NOT PAID25.00180.004,500.00
1121/08/2023MSSOOIL AS-104NOT PAID40.00177.007,080.00
12TOTALOOIL AS-10511,580.00
1321/08/2023MMUY7002MVSOOIL AS-103PAIDYOUSEF SAFE100.00196.0019,600.00
14TOTAL19,600.00
MK
Cell Formulas
RangeFormula
I13,I10:I11,I8,I5:I6,I2:I3I2=G2*H2
I4,I12,I7I4=SUM(I2:I3)
I9,I14I9=SUM(I8)





mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023ST NO 1000MVSGNOO HH 1200RECEIVEDYOUSEF SAFE10.00150.001,500.00
320/08/2023ST NO 1000MVSAS100-12RECEIVEDYOUSEF SAFE10.00130.001,300.00
4TOTAL2,800.00
521/08/2023ST NO 1001MTTMGFH GA-103NOT REICEVED15.00130.001,950.00
6TOTAL1,950.00
721/08/2023ST NO 1002MLLSSFOO 1000 MN1NOT REICEVED2.00140.00280.00
821/08/2023ST NO 1002MLLSSFOO 1000 MN2NOT REICEVED12.00145.001,740.00
921/08/2023ST NO 1002MLLSSFOO 1000 MN3NOT REICEVED10.00145.001,450.00
10TOTAL3,470.00
1124/08/2023VT NO 1003MKKOOIL AS-100RECEIVEDYOUSEF SAFE10.00145.001,450.00
1224/08/2023VT NO 1003MKKOOIL AS-101RECEIVEDYOUSEF SAFE25.00150.003,750.00
1324/08/2023VT NO 1003MKKOOIL AS-102RECEIVEDYOUSEF SAFE40.00155.006,200.00
1424/08/2023VT NO 1003MKKOOIL AS-103RECEIVEDYOUSEF SAFE55.00160.008,800.00
1524/08/2023VT NO 1003MKKOOIL AS-104RECEIVEDYOUSEF SAFE70.00165.0011,550.00
1624/08/2023VT NO 1003MKKOOIL AS-105RECEIVEDYOUSEF SAFE85.00170.0014,450.00
1724/08/2023VT NO 1003MKKOOIL AS-106RECEIVEDYOUSEF SAFE100.00175.0017,500.00
1824/08/2023VT NO 1003MKKOOIL AS-107RECEIVEDYOUSEF SAFE115.00180.0020,700.00
19TOTAL84,400.00
2024/08/2023ST NO 1002MLLSSFOO 1000 MN11NOT REICEVED12.00160.001,920.00
2124/08/2023ST NO 1002MLLSSFOO 1000 MN21NOT REICEVED12.00170.002,040.00
22TOTAL3,960.00
MT
Cell Formulas
RangeFormula
I11:I18,I5,I2:I3I2=G2*H2
I4,I22I4=SUM(I2:I3)
I6I6=SUM(I5:I5)
I20:I21,I7:I9I7=H7*G7
I10I10=SUM(I7:I9)
I19I19=SUM(I11:I18)




mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023MSSUY4000MVSOOIL AS-100RECEIVEDAFORI BANK1.00160.00160.00
320/08/2023MSSUY4000MVSOOIL AS-101RECEIVEDAFORI BANK1.00180.00180.00
4TOTAL340.00
520/08/2023MSSUY4001MVSOOIL AS-102NOT REICEVED1.00155.00155.00
620/08/2023MSSUY4001MVSOOIL AS-103NOT REICEVED1.00190.00190.00
7TOTAL345.00
821/08/2023MSSUY4002MVSOOIL AS-102RECEIVEDAMTOR BANK2.00155.00310.00
9TOTAL310.00
1021/08/2023MSSUY4003MSSOOIL AS-100NOT REICEVED1.00160.00160.00
1121/08/2023MSSUY4003MSSOOIL AS-101NOT REICEVED1.00180.00180.00
1221/08/2023MSSUY4003MSSOOIL AS-102NOT REICEVED1.00155.00155.00
13TOTAL495.00
MS
Cell Formulas
RangeFormula
I10:I12,I8,I5:I6,I2:I3I2=G2*H2
I4,I7I4=SUM(I2:I3)
I9I9=SUM(I8)
I13I13=SUM(I10:I12)





mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
224/08/2023VT NO 1003MKKOOIL AS-100NOT PAID1.00145.00145.00
324/08/2023VT NO 1003MKKOOIL AS-101NOT PAID1.00150.00150.00
424/08/2023VT NO 1003MKKOOIL AS-102NOT PAID2.00155.00310.00
524/08/2023VT NO 1003MKKOOIL AS-103NOT PAID4.00160.00640.00
6TOTAL1,245.00
725/08/2023VT NO 1004MKKOOIL AS-101PAIDYOUSEF SAFE1.00150.00150.00
825/08/2023VT NO 1004MKKOOIL AS-102PAIDYOUSEF SAFE2.00155.00310.00
9TOTAL460.00
1025/08/2023VT NO 1005MLLOOIL AS-103PAIDASTORI BANK4.00160.00640.00
11TOTAL640.00
1225/08/2023VT NO 1006MLLOOIL AS-102PAIDYOUSEF SAFE2.00155.00310.00
1325/08/2023VT NO 1006MLLOOIL AS-103PAIDYOUSEF SAFE4.00160.00640.00
14TOTAL950.00
1525/08/2023VT NO 1007MKKOOIL AS-101PAIDASTORI BANK3.00150.00450.00
16TOTAL450.00
ATS
Cell Formulas
RangeFormula
I15,I12:I13,I10,I7:I8,I2:I5I2=G2*H2
I6I6=SUM(I2:I5)
I9,I14I9=SUM(I7:I8)
I11,I16I11=SUM(I10)




mk.xlsm
ABCDEF
1DATEVOUCHER NONAMECASESAFESTOTAL
220/08/2023VDD1000MVSPAIDASDFT SAFE200
321/08/2023VDD1001MVSPAIDASDFT SAFE120
422/08/2023VDD1002MKKRECEIVEDYOUSEF SAFE100
523/08/2023VDD1003MVSRECEIVEDYOUSEF SAFE120
623/08/2023VDD1004MKKPAIDAFORI BANK120
724/08/2023VDD1005MKKPAIDYOUSEF SAFE100
825/08/2023VDD1006MVSPAIDAFORI BANK200
925/08/2023VDD1007MVSPAIDYOUSEF SAFE100
1025/08/2023VDD1008MKKRECEIVEDAFORI BANK120
VFTY


1- in column(2) in listbox will show sheets names
2- in column(3) in listbox will show items under SAFES column across sheets.
3- column(4) in listbox will brings amount is existed in TOTAL row for column|(I) for each sheet and merge amounts for duplicates items in SAFES column , CASE column together for each sheet alone.
4- and should show zero as hyphen for each digit in columns don't contain amount .
5- as to amounts for NOTPAID,NOT RECEIVED don't contain item in SAFES column then should show for first row for each sheet.
6- should sreach within two dates in TB1,TB2
by the way I have got solution by Dante amore like really similar project but unfortunately I have to change some things .😣
thanks .
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Guys,
I expect data could reach for about 12000 rows for each sheet.
so I would show this report on userform as in picture when there are no dates in TB1,TB2.


View attachment 121552


mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023MMUY7000MVSOOIL AS-100PAIDASDFT SAFE20.00160.003,200.00
320/08/2023MMUY7000MVSOOIL AS-101PAIDASDFT SAFE20.00180.003,600.00
4TOTAL6,800.00
520/08/2023MMUY7001MVSOOIL AS-102PAIDASDFT SAFE40.00155.006,200.00
620/08/2023MMUY7001MVSOOIL AS-103PAIDASDFT SAFE20.00190.003,800.00
7TOTAL10,000.00
821/08/2023MMUY7002MVSOOIL AS-103NOT PAID25.00190.004,750.00
9TOTAL4,750.00
1021/08/2023MSSOOIL AS-103NOT PAID25.00180.004,500.00
1121/08/2023MSSOOIL AS-104NOT PAID40.00177.007,080.00
12TOTALOOIL AS-10511,580.00
1321/08/2023MMUY7002MVSOOIL AS-103PAIDYOUSEF SAFE100.00196.0019,600.00
14TOTAL19,600.00
MK
Cell Formulas
RangeFormula
I13,I10:I11,I8,I5:I6,I2:I3I2=G2*H2
I4,I12,I7I4=SUM(I2:I3)
I9,I14I9=SUM(I8)





mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023ST NO 1000MVSGNOO HH 1200RECEIVEDYOUSEF SAFE10.00150.001,500.00
320/08/2023ST NO 1000MVSAS100-12RECEIVEDYOUSEF SAFE10.00130.001,300.00
4TOTAL2,800.00
521/08/2023ST NO 1001MTTMGFH GA-103NOT REICEVED15.00130.001,950.00
6TOTAL1,950.00
721/08/2023ST NO 1002MLLSSFOO 1000 MN1NOT REICEVED2.00140.00280.00
821/08/2023ST NO 1002MLLSSFOO 1000 MN2NOT REICEVED12.00145.001,740.00
921/08/2023ST NO 1002MLLSSFOO 1000 MN3NOT REICEVED10.00145.001,450.00
10TOTAL3,470.00
1124/08/2023VT NO 1003MKKOOIL AS-100RECEIVEDYOUSEF SAFE10.00145.001,450.00
1224/08/2023VT NO 1003MKKOOIL AS-101RECEIVEDYOUSEF SAFE25.00150.003,750.00
1324/08/2023VT NO 1003MKKOOIL AS-102RECEIVEDYOUSEF SAFE40.00155.006,200.00
1424/08/2023VT NO 1003MKKOOIL AS-103RECEIVEDYOUSEF SAFE55.00160.008,800.00
1524/08/2023VT NO 1003MKKOOIL AS-104RECEIVEDYOUSEF SAFE70.00165.0011,550.00
1624/08/2023VT NO 1003MKKOOIL AS-105RECEIVEDYOUSEF SAFE85.00170.0014,450.00
1724/08/2023VT NO 1003MKKOOIL AS-106RECEIVEDYOUSEF SAFE100.00175.0017,500.00
1824/08/2023VT NO 1003MKKOOIL AS-107RECEIVEDYOUSEF SAFE115.00180.0020,700.00
19TOTAL84,400.00
2024/08/2023ST NO 1002MLLSSFOO 1000 MN11NOT REICEVED12.00160.001,920.00
2124/08/2023ST NO 1002MLLSSFOO 1000 MN21NOT REICEVED12.00170.002,040.00
22TOTAL3,960.00
MT
Cell Formulas
RangeFormula
I11:I18,I5,I2:I3I2=G2*H2
I4,I22I4=SUM(I2:I3)
I6I6=SUM(I5:I5)
I20:I21,I7:I9I7=H7*G7
I10I10=SUM(I7:I9)
I19I19=SUM(I11:I18)




mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
220/08/2023MSSUY4000MVSOOIL AS-100RECEIVEDAFORI BANK1.00160.00160.00
320/08/2023MSSUY4000MVSOOIL AS-101RECEIVEDAFORI BANK1.00180.00180.00
4TOTAL340.00
520/08/2023MSSUY4001MVSOOIL AS-102NOT REICEVED1.00155.00155.00
620/08/2023MSSUY4001MVSOOIL AS-103NOT REICEVED1.00190.00190.00
7TOTAL345.00
821/08/2023MSSUY4002MVSOOIL AS-102RECEIVEDAMTOR BANK2.00155.00310.00
9TOTAL310.00
1021/08/2023MSSUY4003MSSOOIL AS-100NOT REICEVED1.00160.00160.00
1121/08/2023MSSUY4003MSSOOIL AS-101NOT REICEVED1.00180.00180.00
1221/08/2023MSSUY4003MSSOOIL AS-102NOT REICEVED1.00155.00155.00
13TOTAL495.00
MS
Cell Formulas
RangeFormula
I10:I12,I8,I5:I6,I2:I3I2=G2*H2
I4,I7I4=SUM(I2:I3)
I9I9=SUM(I8)
I13I13=SUM(I10:I12)





mk.xlsm
ABCDEFGHI
1DATEINV NONAMEIDCASESAFESQTYUNIT PRICEBALANCE
224/08/2023VT NO 1003MKKOOIL AS-100NOT PAID1.00145.00145.00
324/08/2023VT NO 1003MKKOOIL AS-101NOT PAID1.00150.00150.00
424/08/2023VT NO 1003MKKOOIL AS-102NOT PAID2.00155.00310.00
524/08/2023VT NO 1003MKKOOIL AS-103NOT PAID4.00160.00640.00
6TOTAL1,245.00
725/08/2023VT NO 1004MKKOOIL AS-101PAIDYOUSEF SAFE1.00150.00150.00
825/08/2023VT NO 1004MKKOOIL AS-102PAIDYOUSEF SAFE2.00155.00310.00
9TOTAL460.00
1025/08/2023VT NO 1005MLLOOIL AS-103PAIDASTORI BANK4.00160.00640.00
11TOTAL640.00
1225/08/2023VT NO 1006MLLOOIL AS-102PAIDYOUSEF SAFE2.00155.00310.00
1325/08/2023VT NO 1006MLLOOIL AS-103PAIDYOUSEF SAFE4.00160.00640.00
14TOTAL950.00
1525/08/2023VT NO 1007MKKOOIL AS-101PAIDASTORI BANK3.00150.00450.00
16TOTAL450.00
ATS
Cell Formulas
RangeFormula
I15,I12:I13,I10,I7:I8,I2:I5I2=G2*H2
I6I6=SUM(I2:I5)
I9,I14I9=SUM(I7:I8)
I11,I16I11=SUM(I10)




mk.xlsm
ABCDEF
1DATEVOUCHER NONAMECASESAFESTOTAL
220/08/2023VDD1000MVSPAIDASDFT SAFE200
321/08/2023VDD1001MVSPAIDASDFT SAFE120
422/08/2023VDD1002MKKRECEIVEDYOUSEF SAFE100
523/08/2023VDD1003MVSRECEIVEDYOUSEF SAFE120
623/08/2023VDD1004MKKPAIDAFORI BANK120
724/08/2023VDD1005MKKPAIDYOUSEF SAFE100
825/08/2023VDD1006MVSPAIDAFORI BANK200
925/08/2023VDD1007MVSPAIDYOUSEF SAFE100
1025/08/2023VDD1008MKKRECEIVEDAFORI BANK120
VFTY


1- in column(2) in listbox will show sheets names
2- in column(3) in listbox will show items under SAFES column across sheets.
3- column(4) in listbox will brings amount is existed in TOTAL row for column|(I) for each sheet and merge amounts for duplicates items in SAFES column , CASE column together for each sheet alone.
4- and should show zero as hyphen for each digit in columns don't contain amount .
5- as to amounts for NOTPAID,NOT RECEIVED don't contain item in SAFES column then should show for first row for each sheet.
6- should sreach within two dates in TB1,TB2
by the way I have got solution by Dante amore like really similar project but unfortunately I have to change some things .😣
thanks .
Why is there often no value in the SAFES column?

Should this be the same as the last value in the column?
 
Upvote 0
Why is there often no value in the SAFES column?
not all of cases should be values in SAFES columns.
the safes will be based on PAID ,RECEIVED , as to NOT PAID , NOT RECEIVED will not show items in SAFES column.
is that problem?
 
Upvote 0
not all of cases should be values in SAFES columns.
the safes will be based on PAID ,RECEIVED , as to NOT PAID , NOT RECEIVED will not show items in SAFES column.
is that problem?
So how do you decide which line on the Userform Report the values are used for?

It is the unique combinations of 'SHEETS NAMES' and 'SAFES' which are used to make up columns 2 and 3.
 
Upvote 0
yes should be.
Then you will get this which is not what you want.

Merge data on userform for each sheet based on multiple columns.xlsm
LMNO
2
3MKASDFT SAFE
4MK
5MKYOUSEF SAFE
6MTYOUSEF SAFE
7MT
8MSAFORI BANK
9MS
10MSAMTOR BANK
11ATS
12ATSYOUSEF SAFE
13ATSASTORI BANK
14VFTYASDFT SAFE
15VFTYYOUSEF SAFE
16VFTYAFORI BANK
17
Master
 
Upvote 0
this is not problem for me if you can't do that as I mentioned in point 5.
What does this mean?

'then should show for first row for each sheet.'

Have you thought of having the text boxes as combo boxes with the range of dates containg the dates on the sheets?
 
Upvote 0
'then should show for first row for each sheet.'
yes as I said in point 5, but I thought you can't do that based on your picture!
Have you thought of having the text boxes as combo boxes with the range of dates containg the dates on the sheets?
I prefer listbox because of textboxes and combobox will effect speed of load data on form and requires tools too much !
 
Upvote 0
yes as I said in point 5, but I thought you can't do that based on your picture!

I prefer listbox because of textboxes and combobox will effect speed of load data on form and requires tools too much !
I can do anything and I've already done lots for you but not knowing exactly what you want is stalling me.

Which sheets are you referring to here 'then should show for first row for each sheet.'?

Please post an XL2BB mini-sheet.

I mean having combo boxes to select the date range instead of having to type the dates into the text boxes.
 
Upvote 0

Forum statistics

Threads
1,225,897
Messages
6,187,703
Members
453,435
Latest member
U4US

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