Selecting Articles with quantities in a row till the last filled column and put them below eachother on sheet 2 depending on the value in column B

Jan van der

New Member
Joined
Oct 18, 2021
Messages
2
Office Version
  1. 2007
Platform
  1. Windows
Hello,

I need an vba code for an database as in the example

I have an sheet with a lot of products now it is to column R but that can be also to column AA or XX.
column A, is for identivication we do nothing with that.
column B, when there is an 1 in that row then the row must be copie to sheet 2 including the Qua of that row starting at column C until there is an blank cell.
The cells can have letters and or numbers.
the rows with a zero in column B must be passed.

I hope someone can help me with this

Parts.xlsx
ABCDEFGHIJKLMNOPQRS
1CodeSelectedPart nbQuaPart nbQuaPart nbQuaPart nbQuaPart nbQuaPart nbQuaPart nbQuaPart nbQua
2Code11Oil2Sugar4Leaves3Posts212515110Candy2Cake2
3Code20Sugar4Leaves3Posts2
4Code30Posts212515110Candy2Cake2Sugar4Leaves3Posts2Cake2
5Code41Posts2
6Code50Leaves3Posts212515110Candy2Cake2
7Code61Candy2Cake220A4Leaves3
8Code70Leaves3
9
10
11
12
13
14
15Sheet 2
16
17Oil2
18Sugar4
19Leaves3
20Posts2
2112515110
22Candy2
23Cake2
24Posts2
25Candy2
26Cake2
2720A4
28Leaves3
29
30
31
32
33
Blad1
 

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.
I see that i made an mistake. because cell B4 is an 0 but that should be an 1
Sorry, but can anyone help me with this problem.

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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