Hi
I have many sheets contain the same structure .
on userform I have combobox1 to select sheet name and combobox2 contains Name.
so when I select sheet from combobox1 should search for the matched sheet and when select the name from combobox2 should searched the matched name with column C and when click commandbutton1 should print out the range for the name .
so should print out this
I have many sheets contain the same structure .
on userform I have combobox1 to select sheet name and combobox2 contains Name.
so when I select sheet from combobox1 should search for the matched sheet and when select the name from combobox2 should searched the matched name with column C and when click commandbutton1 should print out the range for the name .
pp.xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | ITEM | DATE | NAME | BATCH | INV NO | QTY | PRICE | BALANCE | ||
2 | 1 | 01/01/2023 | HASSON | BTS00 | INV-001 | 20 | 120 | 2400 | ||
3 | 2 | 01/01/2023 | HASSON | BTS01 | INV-001 | 50 | 110 | 5500 | ||
4 | 3 | 01/01/2023 | HASSON | BTS02 | INV-001 | 50 | 221 | 11050 | ||
5 | 4 | 01/01/2023 | HASSON | BTS03 | INV-001 | 60 | 122 | 7320 | ||
6 | BALANCE | 01/01/2023 | INV-001 | 26270 | ||||||
7 | 1 | 03/01/2023 | HUSSNI | BTS01 | INV-002 | 70 | 120 | 8400 | ||
8 | 2 | 03/01/2023 | HUSSNI | BTS02 | INV-002 | 80 | 115 | 9200 | ||
9 | 3 | 03/01/2023 | HUSSNI | BTS00 | INV-002 | 60 | 112 | 6720 | ||
10 | BALANCE | 03/01/2023 | INV-002 | 24320 | ||||||
11 | 1 | 03/01/2023 | HASSON | BTS01 | INV-003 | 80 | 122 | 9760 | ||
12 | 2 | 04/01/2023 | HASSON | BTS02 | INV-003 | 80 | 111 | 8880 | ||
13 | 3 | 05/01/2023 | HASSON | BTS00 | INV-003 | 80 | 120 | 9600 | ||
14 | BALANCE | 06/01/2023 | INV-003 | 28240 | ||||||
15 | 1 | 03/02/2023 | HOSSAM | BTS01 | INV-004 | 200 | 110 | 22000 | ||
16 | 2 | 04/02/2023 | HOSSAM | BTS02 | INV-004 | 100 | 120 | 12000 | ||
17 | 3 | 05/02/2023 | HOSSAM | BTS00 | INV-004 | 120 | 12 | 1440 | ||
18 | BALANCE | INV-004 | 35440 | |||||||
KVS |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H15:H17,H11:H13,H7:H9,H2:H5 | H2 | =F2*G2 |
H6 | H6 | =SUM(H2:H5) |
H10,H18,H14 | H10 | =SUM(H7:H9) |
so should print out this
pp.xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | ITEM | DATE | NAME | BATCH | INV NO | QTY | PRICE | BALANCE | ||
2 | 1 | 01/01/2023 | HASSON | BTS00 | INV-001 | 20 | 120 | 2400 | ||
3 | 2 | 01/01/2023 | HASSON | BTS01 | INV-001 | 50 | 110 | 5500 | ||
4 | 3 | 01/01/2023 | HASSON | BTS02 | INV-001 | 50 | 221 | 11050 | ||
5 | 4 | 01/01/2023 | HASSON | BTS03 | INV-001 | 60 | 122 | 7320 | ||
6 | BALANCE | 01/01/2023 | INV-001 | 26270 | ||||||
7 | 1 | 03/01/2023 | HASSON | BTS01 | INV-003 | 80 | 122 | 9760 | ||
8 | 2 | 04/01/2023 | HASSON | BTS02 | INV-003 | 80 | 111 | 8880 | ||
9 | 3 | 05/01/2023 | HASSON | BTS00 | INV-003 | 80 | 120 | 9600 | ||
10 | BALANCE | 06/01/2023 | INV-003 | 28240 | ||||||
KVS |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H7:H9,H2:H5 | H2 | =F2*G2 |
H6 | H6 | =SUM(H2:H5) |
H10 | H10 | =SUM(H7:H9) |