VBA / Macro Help

clappl001

New Member
Joined
Feb 27, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am working on a workbook that has an ordering sheet, and then an invoice page that is populated depending on the data entered into the ordering sheet. I want the invoice sheet to expand and contract depending on how many entries are placed on the ordering sheet. I had it doing it through a power query but then if i wanted to have a footer, each time i refreshed the query it would delete the footer if the new data in the order sheet went below where the footer was.

I can't seem to get the sheets to properly upload using xl2bb sorry.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Oh and also i am hoping to maintain some level of formatting both on the invoice table and the footer of the invoice (which will contain payment terms as well as the totals) so that is another issue that i am struggling to solve.
 
Upvote 0
You will receive a faster answer if you post your workbook to a download site.
 
Upvote 0
What goes wrong and at what point of the process does it go wrong?
ok i just realized i was not using it correctly, here are the three sheets i am working with

2025 Parts Table for MG Kits copy.xlsm
ABCDEFGHIJKL
1Glide Screen Parts Order SheetDate of Entry:November 19, 2024
21.Select Parts Category in Column "B".Order #:slkdfd
32.Select Part Name in Column "D".Ship To:
43.Chose Colour-Select in Column "G".Document:
54.Insert Quantity in Column "I".
6Contact:
7
8
9
10Colour
11Parts CategorySKU#Part NameImageAvailableSelectMaterialQTYUnitTotal
12PleatedMesh243442-2.45Pleated Mesh 2450 pleat width 25mm, MOQ 150m, 20x20. BlackBlackPolyester10$11.69$116.90
13      
14      
15      
16      
17      
18      
19      
20      
21      
Order Sheet
Cell Formulas
RangeFormula
E12:E21E12=IF(D12="","",XLOOKUP( D12, Images!E:E,Images!D:D, ""))
F12:F21F12=IF(D12="","",XLOOKUP( D12, Images!E:E,Images!F:F, ""))
J12:J21J12=IF(D12="","",XLOOKUP( D12, Images!E:E,Images!H:H, ""))
K12:K21K12=IF(I12="", "", IFERROR(J12*I12, 0))
C12:C21C12=IF(D12="","",XLOOKUP( D12, Images!E:E,Images!B:B, ""))
H12:H21H12=IF(D12="","",XLOOKUP( D12, Images!E:E,Images!G:G, ""))
Named Ranges
NameRefers ToCells
Anchor_Base_MG__L_R___Includes_a_square_nut_M4=Images!$D$13E12:E21
Bottom_Hook_MG__option=Images!$D$28E12:E21
Bottom_Rail_15=Images!$D$59E12:E21
Bottom_rail_angle_spacer__option=Images!$D$38E12:E21
Bottom_rail_end_MG__option=Images!$D$30E12:E21
Bottom_Rail_Joint_MG=Images!$D$19E12:E21
Catch_Frame_11.5=Images!$D$55E12:E21
Catch_Frame_Cover=Images!$D$8E12:E21
Catch_Frame_End_MG=Images!$D$24E12:E21
Corner_Joint_1450___for_FMA____option=Images!$D$32E12:E21
Double_sided_foam_tape__for_Top_rail___Housing___Catch_frame_____1005__W10mm)_option=Images!$D$42E12:E21
Double_sided_tape__for_Mesh_Strip_23_MG______5600__W20mm=Images!$D$43E12:E21
Dust_cover__option=Images!$D$37E12:E21
Face_Mount_Attachment=Images!$D$61E12:E21
Flat_head_screw____for_Wire_Anchor=Images!$D$45E12:E21
Flat_Installation_screw____for_Bottom_rail=Images!$D$48E12:E21
FMA_center_joint__option=Images!$D$33E12:E21
Handle_MG____With_Handle_Base_Flathead_Tapping_Screw_3x6.5=Images!$D$27E12:E21
Hexagon_wrench__2.5mm=Images!$D$49E12:E21
Housing__44=Images!$D$53E12:E21
Housing_End_MG=Images!$D$23E12:E21
Inner_Cartridge_31.8=Images!$D$50E12:E21
Magnet_strip___for_Sliding_bar_and_Catch_frame___600GS=Images!$D$7E12:E21
Mesh_Holder_End_MG=Images!$D$22E12:E21
Mesh_Strip_23_MG____With_Double_sided_tape__5600_W_20mm=Images!$D$11E12:E21
MG_FMA_End_Cap__R_L____option=Images!$D$34E12:E21
Mo_Hair__option=Images!$D$39E12:E21
Pleated_Mesh_2400__pleat_width_25_mm=Images!$D$2E12:E21
Screw_Pan_TPB____for_End_caps=Images!$D$46E12:E21
Sliding_bar_51=Images!$D$51E12:E21
Sliding_Bar_Bottom_Cap_Assy__MG___With_Roller_P_Roller_M_Shaft_2.2x12mm_Wheel_8.5mm_Shaft_2x6.8mm=Images!$D$21E12:E21
Sliding_Bar_Holder_MG__option___With_Double_sided_tape__5760_W_10mm=Images!$D$29E12:E21
Sliding_Bar_Top_Cap_Assy__MG___With_Roller_P_Roller_M_Shaft_2.2x12mm=Images!$D$20E12:E21
Tapping_head_installation_screw=Images!$D$47E12:E21
Tension_Adjuster_MG__Includes_a_square_nut_M4=Images!$D$26E12:E21
Tesa_tape___for_Bottom_rail___W_25MM__option=Images!$D$40E12:E21
Tesa_tape___for_Transition___W_14MM__option=Images!$D$41E12:E21
Top_Rail_60=Images!$D$57E12:E21
Top_rail_end_MG__option=Images!$D$31E12:E21
Top_Rail_Joint_MG=Images!$D$18E12:E21
Transition__option=Images!$D$35E12:E21
Transition_end_cap__L_R___option=Images!$D$36E12:E21
Trus_head_screw____for_Tension_Adjuster=Images!$D$44E12:E21
Wire=Images!$D$6E12:E21
Wire_Anchor_MG__L_R=Images!$D$14E12:E21
Wire_End_Adjuster_MG__L_R___Includes_a_square_nut_M5__for_Bottom_Rail=Images!$D$15E12:E21
Wire_End_Adjuster_T__Includes_a_square_nut_M5__for_Top_Rail=Images!$D$16E12:E21
Wire_End_Hook_MG__SUS=Images!$D$17E12:E21
Wire_Guide_assy_MG___With_Roller_P_Roller_M_Shaft_2.2x12mm=Images!$D$25E12:E21
Cells with Data Validation
CellAllowCriteria
G12:G21List=INDIRECT(F12)
D12:D21List=INDIRECT(B12)
B12:B21List=LISTS!$A$1:$I$1
F4:H4List=LISTS!$N$2:$N$9


2025 Parts Table for MG Kits copy.xlsm
ABCDEFGHIJKL
1
2
3
4
5
6
7
8
9Customer:Invoice:
10Address:
11Contact:
12Tel:
13Email:
14PO#:
15Date:
16
17PartNameSKUNumberColourQtyUnitPriceTotalPrice
18
19
20Subtotal
21Discount
22Tax
23Subtotal
24Freight
25Total
26
27
28
29
30
31
32
33
Invoice


Cell Formulas
RangeFormula
A2:A36A2='Order Sheet'!D12
B2:B36B2='Order Sheet'!C12
C2:C36C2='Order Sheet'!G12
D2:F36D2='Order Sheet'!I12
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,829
Members
452,673
Latest member
LaMiaAvy

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