Results 1 to 2 of 2

Thread: Cut & paste between sheets Move Some Data Rows To New Worksheet Based On Conditions

  1. #1
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0

    Cut & paste between sheets Move Some Data Rows To New Worksheet Based On Conditions

    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-pro...ml#post5368297
    http://www.eileenslounge.com/viewtopic.php?f=30&t=35000

    Attached Files Attached Files
    Last edited by DocAElstein; 07-27-2020 at 08:20 PM. Reason: another cross post..

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    Here is a solution. ( https://excelfox.com/forum/showthrea...ll=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/showthrea...ll=1#post14717

    Before:

    _____ Workbook: 1.xls ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    1265
    1265
    1246.5
    1275.3
    1247
    22
    BUY
    1167.611
    3
    NSE ADANIENT EQ
    151.85
    165.45
    151.4
    151.85
    152.35
    25
    BUY
    141.0465
    4
    NSE HDFC EQ
    1805
    1826
    1805
    1809.3
    1786.05
    1330
    BUY
    1624.03
    5
    NSE HDFCBANK EQ
    985
    988.4
    970
    991.85
    971.85
    1333
    BUY
    854.6115
    6
    NSE HEROMOTOCO EQ
    2316
    2345
    2300
    2292.25
    2311.8
    1348
    SHORT
    2024.154
    7
    NSE HINDALCO EQ
    145.9
    147.45
    142.45
    146.95
    143.6
    1363
    BUY
    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
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ADANIENT EQ
    151.85
    165.45
    151.4
    151.85
    152.35
    25
    BUY
    141.0465
    3
    NSE HDFCBANK EQ
    985
    988.4
    970
    991.85
    971.85
    1333
    BUY
    854.6115
    4
    NSE HEROMOTOCO EQ
    2316
    2345
    2300
    2292.25
    2311.8
    1348
    SHORT
    2024.154
    5
    NSE HINDALCO EQ
    145.9
    147.45
    142.45
    146.95
    143.6
    1363
    BUY
    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
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    1265
    1265
    1246.5
    1275.3
    1247
    22
    BUY
    1167.611
    3
    NSE HDFC EQ
    1805
    1826
    1805
    1809.3
    1786.05
    1330
    BUY
    1624.03
    Worksheet: 1-Sheet1



    Macro here: https://excelfox.com/forum/showthrea...ll=1#post14728




    Similar Post
    https://www.mrexcel.com/board/thread.../#post-5527494
    Last edited by DocAElstein; 07-27-2020 at 08:20 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. Replies: 6
    Last Post: 08-28-2019, 09:42 AM
  2. Replies: 0
    Last Post: 09-26-2018, 02:37 PM
  3. Replies: 15
    Last Post: 01-04-2013, 03:26 PM
  4. VBA -- Copy/Paste across sheets
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 09-21-2012, 02:07 PM
  5. Trapping Copy To Range Before Copy/Cut Paste
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-07-2011, 07:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •