Excel VBA to extract data based on various criteria (cell values)
Posted on 2011-05-04
We have been manually checking and reconciling our client's bank statements by hand every day. Now we would like to automate it as much as possible. So instead of looking up the prior day's data from a pdf and enter it into a cell, the bank provides statements in xls as well. However, really ugly xls file, that are more or less just the pdf in xls, but not a nice table structure.
So I am looking for a solution that would search for example from row 1 downwards for the account number 0038797031 in column K. after this row, it needs to search for the string "CLOSING" in column C. if that is found, the value on that row in column O should be returned or fetched to another sheet (or for the purpose of this answer just displayed as message box).
Then the code would continue downwards and look for account number 0078943421 in column K. and again if found, continue the rows downwards in column C for "CLOSING", if found cell value in column O of that row should be returned.
Many thanks for your help!