The following code in an excel macro will select rows 7 and 8 of the active sheet:
Hope that helps.VB:Range("7:8").Select
I am a relatively skilled user of Excel's included functions, but I have never used macros beyond the basic recorded stage before.
I am now trying to automate a monthly report that involves comparing two sets of data and eliminating the ones that match in order to separate out discrepancies. In order to do this, I'm trying to compare several cells in a single row with the same cells in the row immediately below. If all data matches, I want to select both rows, move them to a different worksheet, and continue down the list.
I have hit a snag on selecting multiple rows using the variable of the FOR and IF statements. I am able to select a single row, but not to select both.
Can anyone offer any (simple if possible - I'm not a programmer so don't get too fancy) suggestions on how to do this?
Thanks very much in advance
Unfortunately, still not working. I need to be able to select the range based on a variable, and I still get an error when I try to substitute the variable info into the Range() command.
Using i as a variable, I substituted as follows: Range(i,i+1).Select, trying to get both rows. No go. How can I get the select to accept variable information?
There are currently 2 users browsing this thread. (0 members and 2 guests)