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 )
Worksheet: 1-Sheet1 20 June excelforum
Row\Col A B C D E F G H I J 1Exchange Symbol Series/Expiry Open High Low Prev Close LTP 2NSE ACC EQ 1200 1200 1173 1194.2 1194.2 22 3NSE ADANIENT EQ 141.4 143.7 141.4 141.05 141.05 25 4NSE ADANIPORTS EQ 309 309 309 309.25 309.25 15083 5NSE ADANIPOWER EQ 33.3 33.3 32.1 32.35 32.35 17388 6NSE AMARAJABAT EQ 555 578 555 572.85 572.85 100 7NSE ASIANPAINT EQ 1529 1529 1529 1552.95 1552.95 236 8
_____ Workbook: Macro 20June excelforum.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet1 20 June excelforum
Row\Col A B C D E F G H I J K L M 1Symbol 2ACC 22 1 2 3 4 3ADANIENT 25 1 2 3 4ADANIPORTS 15083 1 5ADANIPOWER 17388 1 2 3 4 5 6 7 6AMARAJABAT 100 1 2 3 4 5 6 7 8 9 10 11 7ASIANPAINT 236 8AMBUJACEM 1270 9APOLLOHOSP 157 10APOLLOPIPE 14361 11ASHOKLEY 212 12AUROPHARMA 275 13AXISBANK 5900 14BAJAJ-AUTO 16669
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




Reply With Quote

Bookmarks