davefaust78
New Member
- Joined
- Sep 11, 2017
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
Hi,
I am writing a VBA code to automatically clean up some excel reports I run on a regular basis and I have a situation where I am stuck.
Column J of my data contains Country Names and column K of my data has State Names.
Here's what I need:
If the values in column J are not equal to either United States or Canada, then clear the states value name in the adjacent cell.
For example, Here's how my data currently looks:
<tbody>
</tbody>
For each of the countries that are not equal to United States or Canada, I need the state values cleared.
It's driving me crazy as I'm relatively new to VBA. Any help that anyone can offer would be a huge lifesaver.
I'd like to run this as it's own sub.
Thank you.
Regards,
Dave
I am writing a VBA code to automatically clean up some excel reports I run on a regular basis and I have a situation where I am stuck.
Column J of my data contains Country Names and column K of my data has State Names.
Here's what I need:
If the values in column J are not equal to either United States or Canada, then clear the states value name in the adjacent cell.
For example, Here's how my data currently looks:
Canada | BC |
United States | TX |
Brazil | Rio de Janeiro |
United States | NY |
Canada | SK |
Chile | Santiago |
Brazil | Goias |
Italy | Roma |
United States | CA |
United Kingdom | Surry |
<tbody>
</tbody>
For each of the countries that are not equal to United States or Canada, I need the state values cleared.
It's driving me crazy as I'm relatively new to VBA. Any help that anyone can offer would be a huge lifesaver.
I'd like to run this as it's own sub.
Thank you.
Regards,
Dave