Results 1 to 10 of 75

Thread: vba Copy Paste Conditional to put remark 1 2 3 .. etc

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Moderstor notice:
    Copy of a similar post in another forum, just for future referrence... ( Post made by Avinash in one of his many forum names ,
    https://www.excelforum.com/excel-pro...een-files.html )



    Hi there, I am looking for a macro As mentioned below
    Plz see the sample file attached below
    If column D of 1.xls is equal to Column E of 1.xls & column D of 1.xls is not equal to column F of 1.xls then match Column I of 1.xls with column B of macro.xlsm & if it matches the put the remark in series as shown in the sample file(We will put the remark from column C of macro.xlsm & if column C has data then from column D and so on... in series wise)
    If column D of 1.xls is equal to Column F of 1.xls & column D of 1.xls is not equal to column E of 1.xls then match Column I of 1.xls with column B of macro.xlsm & if it matches the put the remark in series as shown in the sample file(We will put the remark from column C of macro.xlsm & if column C has data then from column D and so on... in series wise)
    If column D of 1.xls is equal to Column F of 1.xls & column D of 1.xls is equal to column E of 1.xls then don't do anything
    Plz note: Macro will be placed in macro.xlsm which i have attached below & 1.xls & macro.xlsm may be in different path so I will edit the path As per my needs
    _____ Workbook: 1 20June excelforum.xls ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    1200
    1200
    1173
    1194.2
    1194.2
    22
    3
    NSE ADANIENT EQ
    141.4
    143.7
    141.4
    141.05
    141.05
    25
    4
    NSE ADANIPORTS EQ
    309
    309
    309
    309.25
    309.25
    15083
    5
    NSE ADANIPOWER EQ
    33.3
    33.3
    32.1
    32.35
    32.35
    17388
    6
    NSE AMARAJABAT EQ
    555
    578
    555
    572.85
    572.85
    100
    7
    NSE ASIANPAINT EQ
    1529
    1529
    1529
    1552.95
    1552.95
    236
    8
    Worksheet: 1-Sheet1 20 June excelforum

    _____ Workbook: Macro 20June excelforum.xlsm ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    1
    Symbol
    2
    ACC
    22
    1
    2
    3
    4
    3
    ADANIENT
    25
    1
    2
    3
    4
    ADANIPORTS
    15083
    1
    5
    ADANIPOWER
    17388
    1
    2
    3
    4
    5
    6
    7
    6
    AMARAJABAT
    100
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    7
    ASIANPAINT
    236
    8
    AMBUJACEM
    1270
    9
    APOLLOHOSP
    157
    10
    APOLLOPIPE
    14361
    11
    ASHOKLEY
    212
    12
    AUROPHARMA
    275
    13
    AXISBANK
    5900
    14
    BAJAJ-AUTO
    16669
    Worksheet: Sheet1 20 June excelforum



    Original question in this Thread: Post#1
    https://excelfox.com/forum/showthrea...mark-1-2-3-etc
    https://excelfox.com/forum/showthread.php/2433-vba-Copy-Paste-Conditional-to-put-remark-1-2-3-etc
    If column I is sell then see the value of column K & if column K is Greater than sheet2 of column E then put the remark in sheet3 in the stock name from column B
    If column I is buy then see the value of column K & if column K is lower than sheet2 of column F then put the remark in sheet3 in the stock name from column B
    remark will be in series like 1,2,3,4,5,6 and so on
    vba is palced in a separate file
    all files are located in same place
    and after putting the remark clear sheet 1 and sheet 2


    Post #25:
    https://excelfox.com/forum/showthrea...ll=1#post13161
    https://excelfox.com/forum/showthread.php/2433-vba-Copy-Paste-Conditional-to-put-remark-1-2-3-etc?p=13161&viewfull=1#post13161
    If column B of 2.xlsm match with column B of 1.xls then paste the data from column C of 2.xls as 1,2,3,4,5 and so on....
    &
    If column B of 2.xlsm doesn't match with column B of 1.xls then delete all the data from column C of that row

    macro will be placed in 2.xlsm
    all files re located in different path
    sheet name can be anything
    Last edited by DocAElstein; 06-26-2020 at 02:57 PM.

Similar Threads

  1. Replies: 26
    Last Post: 09-26-2020, 05:56 PM
  2. VBA -- Copy/Paste across sheets
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 09-21-2012, 02:07 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
  •