Print out range for specific sheet based on two comboboxes on userform

Hasson

Active Member
Joined
Apr 8, 2021
Messages
406
Office Version
  1. 2016
Platform
  1. Windows
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 .

pp.xlsm
ABCDEFGH
1ITEMDATENAMEBATCHINV NOQTYPRICEBALANCE
2101/01/2023HASSONBTS00INV-001201202400
3201/01/2023HASSONBTS01INV-001501105500
4301/01/2023HASSONBTS02INV-0015022111050
5401/01/2023HASSONBTS03INV-001601227320
6BALANCE01/01/2023INV-00126270
7103/01/2023HUSSNIBTS01INV-002701208400
8203/01/2023HUSSNIBTS02INV-002801159200
9303/01/2023HUSSNIBTS00INV-002601126720
10BALANCE03/01/2023INV-00224320
11103/01/2023HASSONBTS01INV-003801229760
12204/01/2023HASSONBTS02INV-003801118880
13305/01/2023HASSONBTS00INV-003801209600
14BALANCE06/01/2023INV-00328240
15103/02/2023HOSSAMBTS01INV-00420011022000
16204/02/2023HOSSAMBTS02INV-00410012012000
17305/02/2023HOSSAMBTS00INV-004120121440
18BALANCEINV-00435440
KVS
Cell Formulas
RangeFormula
H15:H17,H11:H13,H7:H9,H2:H5H2=F2*G2
H6H6=SUM(H2:H5)
H10,H18,H14H10=SUM(H7:H9)




PR.JPG



so should print out this
pp.xlsm
ABCDEFGH
1ITEMDATENAMEBATCHINV NOQTYPRICEBALANCE
2101/01/2023HASSONBTS00INV-001201202400
3201/01/2023HASSONBTS01INV-001501105500
4301/01/2023HASSONBTS02INV-0015022111050
5401/01/2023HASSONBTS03INV-001601227320
6BALANCE01/01/2023INV-00126270
7103/01/2023HASSONBTS01INV-003801229760
8204/01/2023HASSONBTS02INV-003801118880
9305/01/2023HASSONBTS00INV-003801209600
10BALANCE06/01/2023INV-00328240
KVS
Cell Formulas
RangeFormula
H7:H9,H2:H5H2=F2*G2
H6H6=SUM(H2:H5)
H10H10=SUM(H7:H9)
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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