good afternoon,
I'm trying to write some macro that will search my spreadsheet for a range of accounts, if it finds even just one number in that range it then does a bunch of steps, if it can't find any accounts in that range then the macro should do nothing.
I've found a way that my goal can be accomplished by seaching for each account and if it finds it it's assigned a number then does a few other steps but I'm pretty sure this is a horrible way to write the macro, in addition, it would be very lengthy because I'd have to search for every single account. I've tried to seach the internet for some help but have come up empty.
As an example:
Search for any account in the range of 100000-300000
if there is a number in this range then do some additional steps involving checking if the corresponding 6xxxxx number is also in the spreadsheet, if it's not in the spreadsheet then I need to add it, if it already is in the spreadsheet then nothing is required.
If the spreadsheet doesn't contain any numbers between 100000-300000 then it does nothing.
One possible additional complexity is that the report shows the account names with some asterisks and the account name rather than just the account number:
* 100000 Cash
* 110000 Investments
** Total Cash & Other
Sorry for the long post. I know how to do the other steps I require, but I'm stuck on how to search for the range of numbers. I appreciate any assistance you might be able to provide
Thank you
I'm trying to write some macro that will search my spreadsheet for a range of accounts, if it finds even just one number in that range it then does a bunch of steps, if it can't find any accounts in that range then the macro should do nothing.
I've found a way that my goal can be accomplished by seaching for each account and if it finds it it's assigned a number then does a few other steps but I'm pretty sure this is a horrible way to write the macro, in addition, it would be very lengthy because I'd have to search for every single account. I've tried to seach the internet for some help but have come up empty.
As an example:
Search for any account in the range of 100000-300000
if there is a number in this range then do some additional steps involving checking if the corresponding 6xxxxx number is also in the spreadsheet, if it's not in the spreadsheet then I need to add it, if it already is in the spreadsheet then nothing is required.
If the spreadsheet doesn't contain any numbers between 100000-300000 then it does nothing.
One possible additional complexity is that the report shows the account names with some asterisks and the account name rather than just the account number:
* 100000 Cash
* 110000 Investments
** Total Cash & Other
Sorry for the long post. I know how to do the other steps I require, but I'm stuck on how to search for the range of numbers. I appreciate any assistance you might be able to provide
Thank you