Ignore zero for in last column when copy specific columns from sheet to another

abdo meghari

Well-known Member
Joined
Aug 3, 2021
Messages
651
Office Version
  1. 2019
Hi
I want copying specific columns(A,B,C,D,E,K) from STOCK sheet to STOCK1 sheet , but I want excluding item in column B contains zero for adjacent cell in column K
when copy the data I don't want copying formatting I will create manually in STOCK1 sheet so should copy starting from row2 and should update STOCK1 sheet when update STOCK sheet without repeat copy to the bottom .
I need macro to deal with big data

a.xlsm
ABCDEFGHIJK
1ITEMCODEBRANDTYPEORIGINSTPTATALTRETNET
21BSJG580120020BS 1200R20G580JAP20.0020.005.002.0037.00
32BSTG580120020BS 1200R20G580THI10.0010.005.0015.00
43BSTR187120020BS 1200R20R187THI5.005.00
54BSJ3158022.5BS 315/80R22.5R184THI10.005.005.00.00
STOCK


a.xlsm
ABCDEF
1ITEMCODEBRANDTYPEORIGINNET
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
STOCK1

result

a.xlsm
ABCDEF
1ITEMCODEBRANDTYPEORIGINNET
21BSJG580120020BS 1200R20G580JAP37.00
32BSTG580120020BS 1200R20G580THI15.00
43BSTR187120020BS 1200R20R187THI5.00
STOCK1
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If you are happy with formula

Try

Book1
ABCDEFGHIJKL
1ITEMCODEBRANDTYPEORIGINSTPTATALTRETNET
21BSJG580120020BS 1200R20G580JAP20205237
32BSTG580120020BS 1200R20G580THI1010515
43BSTR187120020BS 1200R20R187THI55
55BSTR187120020BS 1200R20R188THI52036
64BSJ3158022.5BS 315/80R22.5R184THI10550
7
8
9STOCK1
10ITEMCODEBRANDTYPEORIGINNET
111BSJG580120020BS 1200R20G580JAP37
122BSTG580120020BS 1200R20G580THI15
133BSTR187120020BS 1200R20R187THI5
145BSTR187120020BS 1200R20R188THI6
15 
16
Sheet2
Cell Formulas
RangeFormula
B11:F14B11=IFERROR(INDEX($B$2:$K$6,MATCH($A11,$A$2:$A$6,0),MATCH(B$10,$B$1:$K$1,0)),"")
A11:A15A11=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,(ROW($A$2:$A$6)-ROW($A$2)+1)/($K$2:$K$6<>0),ROWS($A$11:A11))),"")
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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