View Full Version : Cut & paste between sheets Move Some Data Rows To New Worksheet Based On Conditions
fixer
07-22-2020, 01:02 AM
Hi Experts,
I am looking for a macro that will do the things mentioned below
macro will be placed in a macro.xlsm
sample.xls & macro.xlsm both are loacted at different places, So the path should be hardcoded in the macro so that i can change it as per my needs
sheet name can be anything
If column D of sample.xls is equal to column E of sample.xls Or column D of sample.xls is equal to column F of sample.xls then do nothing else put that data into new sheet by creating a new sheet in it & remove that data from current sheet(plz see the sample file)
https://www.excelforum.com/excel-programming-vba-macros/1322307-cut-and-paste-between-sheets.html#post5368297
http://www.eileenslounge.com/viewtopic.php?f=30&t=35000
DocAElstein
07-27-2020, 12:09 AM
Here is a solution. ( https://excelfox.com/forum/showthread.php/2577-Appendix-Thread-(-Codes-for-other-Threads-(-Avinash-)-)?p=14728&viewfull=1#post14728 )
It uses the way of getting the required rows in the original first worksheet before , that are needed in
_ the first worksheet after,
And
_ in the new worksheet
Here are some notes in support of solution:
https://excelfox.com/forum/showthread.php/2577-Appendix-Thread-(-Codes-for-other-Threads-(-Avinash-)-)?p=14717&viewfull=1#post14717
Before:
_____ Workbook: 1.xls ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G
H
I
J
K
1ExchangeSymbolSeries/ExpiryOpenHighLow Prev CloseLTP
2NSEACCEQ
1265
1265
1246.5
1275.3
1247
22BUY
1167.611
3NSEADANIENTEQ
151.85
165.45
151.4
151.85
152.35
25BUY
141.0465
4NSEHDFCEQ
1805
1826
1805
1809.3
1786.05
1330BUY
1624.03
5NSEHDFCBANKEQ
985
988.4
970
991.85
971.85
1333BUY
854.6115
6NSEHEROMOTOCOEQ
2316
2345
2300
2292.25
2311.8
1348SHORT
2024.154
7NSEHINDALCOEQ
145.9
147.45
142.45
146.95
143.6
1363BUY
119.9375
Worksheet: 1-Sheet1
After
_____ Workbook: 1.xls ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G
H
I
J
K
1ExchangeSymbolSeries/ExpiryOpenHighLow Prev CloseLTP
2NSEADANIENTEQ
151.85
165.45
151.4
151.85
152.35
25BUY
141.0465
3NSEHDFCBANKEQ
985
988.4
970
991.85
971.85
1333BUY
854.6115
4NSEHEROMOTOCOEQ
2316
2345
2300
2292.25
2311.8
1348SHORT
2024.154
5NSEHINDALCOEQ
145.9
147.45
142.45
146.95
143.6
1363BUY
119.9375
Worksheet: New Worksheet
_____ Workbook: 1.xls ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G
H
I
J
K
1ExchangeSymbolSeries/ExpiryOpenHighLow Prev CloseLTP
2NSEACCEQ
1265
1265
1246.5
1275.3
1247
22BUY
1167.611
3NSEHDFCEQ
1805
1826
1805
1809.3
1786.05
1330BUY
1624.03
Worksheet: 1-Sheet1
Macro here: https://excelfox.com/forum/showthread.php/2577-Appendix-Thread-(-Codes-for-other-Threads-(-Avinash-)-)?p=14728&viewfull=1#post14728
Similar Post
https://www.mrexcel.com/board/threads/cut-paste-the-data-to-new-sheet-if-condition-matches.1141101/#post-5527494
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.