In support of this Thread https://excelfox.com/forum/showthrea...3427#post13427
If column H of 1.xls is greater than column D of 1.xls then calculate 1% of column D of 1.xls & add it to column D of 1.xls and compare column D of 1.xls with column I of 1.xls & if column D of 1.xls is greater than column I of 1.xls then see column I and match column I of of 1.xls with column B of Alert..csv & if it matches then delete that entire row of Alert..csv
If column H of 1.xls is lower than column D of 1.xls then calculate 1% of column D of 1.xls & subtract it to column D of 1.xls and compare column D of 1.xls with column I of 1.xls & if column D of 1.xls is lower than column I then see column I of 1.xls and match column I of of 1.xls with column B of Alert..csv & if it matches then delete that entire row of Alert..csv
Excel File:
_____ Workbook: 1.xls ( Using Excel 2007 32 bit )
Worksheet: 1-Sheet1 24Mai
Row\Col A B C D E F G H I 1Exchange Symbol Series/Expiry Open High Low Prev Close LTP 2NSE ACC EQ 1172 1240 1161.6 1227.1 1227.1 22 3NSE ADANIENT EQ 138 141.2 136.6 138.1 140 25 4NSE ADANIPORTS EQ 315 315 306.55 310.6 312 15083 5NSE ADANIPOWER EQ 33.5 34.5 32.85 33 33.2 17388 6NSE AMARAJABAT EQ 600 613.5 586.9 592.55 592.55 100 7NSE ASIANPAINT EQ 1568.8 1625 1555.4 1617.9 1617.9 236
Text File:
Code:NSE,236,6,>,431555,A,,,,,GTT NSE,25,6,>,431555,A,,,,,GTT NSE,15083,6,>,431555,A,,,,,GTT NSE,17388,6,>,431555,A,,,,,GTT NSE,100,6,>,431555,A,,,,,GTT NSE,22,6,>,431555,A,,,,,GTT ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,Entire row of row 3 & row 4 both will be deleted after runing the macro,,,,,
Row in 1.xls 2Column H is > column D Column D + 1% is > Column I 22 is matched to last line of data in Text File. So last line in data File should be removed. 3Column H is > column D Column D + 1% is > Column I 25 is matched to second line of data in Text File. So thisline in data File should be removed. 4Column H is < Column D Column D - 1% is < Column I 15083 is matched to third line of Text File. So this line is to be deleted 5Column H is < Column D Column D - 1% is < Column I 17388 is matched to forth line of Text File. So this line is to be deleted 6Column H is < Column D Column D - 1% is not < Column I so no match to be done , nothing more to be done 7Column H is > column D Column D + 1% is > Column I 236 is matched to first line of data in Text File. So first line in data File should be removed.
Text File after
Code:NSE,100,6,>,431555,A,,,,,GTT ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,Entire row of row 3 & row 4 both will be deleted after runing the macro,,,,,




Reply With Quote
Bookmarks