Hey everyone,
Im new to VBA programming, I was asked to help speed up some processes at work and I am lost about what to do next.
The situation is that I have to compare two columns on different worksheets, both are account numbers. I have to compare one to the other and if the account appears on both worksheets, I have to delete one of the rows holding the account number... for example
Account # (worksheet 1) Account # (worksheet 2)
123 123
323 344
455 468
222 323
and so forth...
I don't have my work so far to show what I have tried to do, but so far I have tried looping a program to read the Cell in worksheet 1 and compare it to worksheet 2, and delete the Row in worksheet 1 if the value appears anywhere on worksheet 2's column. I figured it might have something to do with arrays, but I am not sure how to set it up or what sort of process i can use. Is there any way i can check a single cell value from worksheet 1 to the entire array of the column in worksheet 2?
I figured if that worked, a macro could recognize if the number is on worksheet two and i can have an IF THEN statement where the row deletes itself. Does that sound right? ANy ideas about how to get the single value to check against every number in an array? or just against the column in general?
thanks
Im new to VBA programming, I was asked to help speed up some processes at work and I am lost about what to do next.
The situation is that I have to compare two columns on different worksheets, both are account numbers. I have to compare one to the other and if the account appears on both worksheets, I have to delete one of the rows holding the account number... for example
Account # (worksheet 1) Account # (worksheet 2)
123 123
323 344
455 468
222 323
and so forth...
I don't have my work so far to show what I have tried to do, but so far I have tried looping a program to read the Cell in worksheet 1 and compare it to worksheet 2, and delete the Row in worksheet 1 if the value appears anywhere on worksheet 2's column. I figured it might have something to do with arrays, but I am not sure how to set it up or what sort of process i can use. Is there any way i can check a single cell value from worksheet 1 to the entire array of the column in worksheet 2?
I figured if that worked, a macro could recognize if the number is on worksheet two and i can have an IF THEN statement where the row deletes itself. Does that sound right? ANy ideas about how to get the single value to check against every number in an array? or just against the column in general?
thanks