Notes to assist me in answering this Thread:
https://excelfox.com/forum/showthrea...-with-Matching
Before
_____ Workbook: ap.xls ( Using Excel 2007 32 bit )
Worksheet: ap-Sheet1
Row\Col A B C D E F G H I J K L M N O P Q R S T U V W X Y 1UserId AccountId EntityName Exchg-Seg Symbol Instrument Name Option Type NetBuyValue NetSellValue NetValue NetBuyQty NetSellQty NetQty BEP SellAvgPrice BuyAvgPrice LastTradedPrice MarkToMarket Realized MarkToMarket Unrealized MarkToMarket EL MarkToMarket Trading Symbol Client Context Series/Expiry Strike Price 2WC5758 NSE AMBUJACEM EQ 10781.10 10878.30 97.20 54 54 201.45 199.65 201 97.2 -97.2 97.2AMBUJACEM-EQ EQ 3WC5758 NSE ADANIENT EQ 420.60 430.50 9.90 2 2 215.25 210.30 210.35 9.9 9.9 9.9ADANIENT-EQ EQ 4WC5758 NSE MARICO EQ 1688.40 1713.00 24.60 6 6 285.50 281.40 281.9 24.6 24.6 24.6MARICO-EQ EQ 5WC5758 NSE APOLLOTYRE EQ 2429.10 2405.70 -23.40 18 18 133.65 134.95 135 -23.4 -23.4 -23.4APOLLOTYRE-EQ EQ 6WC5758 NSE L&TFH EQ 1765.80 1794.60 28.80 18 18 99.70 98.10 98.25 28.8 28.8 28.8L&TFH-EQ EQ
_____ Workbook: Book1.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Row\Col A B C D E F G H 1Symbol 2AMBUJACEM 22 1 2 3 4 5 3ADANIENT 25 1 4APOLLOTYRE 15083 5ADANIPOWER 17388 1 2 3 6
_____ Workbook: Book1.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet3
Row\Col A B C D E F G H I J 1Symbol 2AMBUJACEM 22 1 2 3 4 5 3ADANIENT 25 1 4APOLLOTYRE 15083 1 2 3 4 5 6 7 5ADANIPOWER 17388 1 2 3 6
macro will be placed in Book1.xlsm
We have to look on Column S of ap.xls and If column S of ap.xls has negative numbers then we have to look on Column E of ap.xls & we will match that Column E data of ap.xls with column A of sheet1 of Book1.xlsm & if it matches then we will see wheather column C of Book1.xlsm has data in it or not & if column C of Book1.xlsm has data in it then do nothing & if column C of Book1.xlsm doesn't have data then we will go to sheet3 of Book1.xlsm and we will look for a match of Column E data of ap.xls with column A of sheet3 of Book1.xlsm & if it is found then we will copy the data from sheet3 of Book1.xlsm and paste it to sheet1 of book1.xlsm & we increase one more number in series in it
After
_____ Workbook: Book1.xlsm ( Using Excel 2007 32 bit )
Worksheet: Sheet1
Row\Col A B C D E F G H I J 1Symbol 2AMBUJACEM 22 1 2 3 4 5 3ADANIENT 25 1 4APOLLOTYRE 15083 1 2 3 4 5 6 7 8 5ADANIPOWER 17388 1 2 3 6 7
macro in next post...




Reply With Quote
Bookmarks