formula or code copy data from sheet to another based on cell value

Hasson

Active Member
Joined
Apr 8, 2021
Messages
401
Office Version
  1. 2016
Platform
  1. Windows
hello
I have data in first sheet what I want copy to the second sheet with ignore any customer has value is 0 in col E , it doesn't make difference formula or code
first
1.xlsx
ABCDE
3itemcustomercreditdebitbalance
41ali300400100
52omar300500200
63mahmoud7007000
74ami2502500
85alla8008000
sh1


expected result in second sheet
2.xlsx
ABCDE
31ali300400100
42omar300500200
sh2
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try formula in A3 of second sheet:
Other.xlsm
ABCDE
31ali300400100
42omar300500200
sh2
Cell Formulas
RangeFormula
A3:E4A3=FILTER('sh1'!$A4:$E8,'sh1'!$E4:$E8<>0)
Dynamic array formulas.
 
Upvote 0
@JackDanIce The OP is using 2016 & so doesn't have the filter function. ;)

@Hasson how about
+Fluff 1.xlsm
ABCDE
1
2
3itemcustomercreditdebitbalance
41ali300400100
52omar300500200
63mahmoud7007000
74ami2502500
85alla8008000
9
Sheet1


+Fluff 1.xlsm
ABCDE
1
2itemcustomercreditdebitbalance
31ali300400100
42omar300500200
5     
6
Sheet2
Cell Formulas
RangeFormula
A3:E5A3=IFERROR(INDEX(Sheet1!A$4:A$8,AGGREGATE(15,6,(ROW(Sheet1!$E$4:$E$8)-ROW(Sheet1!$E$4)+1)/(Sheet1!$E$4:$E$8<>0),ROWS(A$3:A3))),"")
 
Upvote 0
Solution
@Fluff Maybe they'll be inspired to upgrade! :-p

Thanks for the heads-up, I was confusing Data Get and Transform (2016) vs dynamic formulas more recent, d'oh!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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