Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Complex Compare Values, and Copy/Paste if in One Sheet but Not Oth
I am looking for a way of testing values, in Column A, on two sheets. I have
a sheet named €˜Analysis of Interest Current and €˜Analysis. I know €˜Analysis of Interest Current has 7 numbers that €˜Analysis does not have; these are account numbers. I want to test the values in these two sheets, and if a number exists on €˜Analysis of Interest Current but not on €˜Analysis, then I want to copy the row and insert it, in chronological order, into €˜Analysis; insert the whole row in the cell below. For instance, I have account number 7200-0147 (just a number; no text in the cell) in €˜Analysis of Interest Current. I know this account is not in €˜Analysis, but I do have account 7200-0146 in €˜Analysis. Basically, I wanted to copy/paste the row with 7200-0147 below the row with 7200-0146. Im sure it can be done, but not sure how difficult it is. Does anyone here have such a macro, or similar code that is easily modified to do what I described above? If so, please share. TIA!!! Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Complex Compare Values, and Copy/Paste if in One Sheet but Not Oth
If the two columns are sorted then you can use a simple loop I think...
if .offset(i,0) in one sheet is equal to .offset(i,0) in the other then do nothing. If it's not then because both columns are sorted you can insert the row from the 'lesser' value in before the row with the 'greater' value, and then move to the next loop. "ryguy7272" wrote: I am looking for a way of testing values, in Column A, on two sheets. I have a sheet named €˜Analysis of Interest Current and €˜Analysis. I know €˜Analysis of Interest Current has 7 numbers that €˜Analysis does not have; these are account numbers. I want to test the values in these two sheets, and if a number exists on €˜Analysis of Interest Current but not on €˜Analysis, then I want to copy the row and insert it, in chronological order, into €˜Analysis; insert the whole row in the cell below. For instance, I have account number 7200-0147 (just a number; no text in the cell) in €˜Analysis of Interest Current. I know this account is not in €˜Analysis, but I do have account 7200-0146 in €˜Analysis. Basically, I wanted to copy/paste the row with 7200-0147 below the row with 7200-0146. Im sure it can be done, but not sure how difficult it is. Does anyone here have such a macro, or similar code that is easily modified to do what I described above? If so, please share. TIA!!! Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Complex Compare Values, and Copy/Paste if in One Sheet but Not
That would probably work. How do I do that?
Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Sam Wilson" wrote: If the two columns are sorted then you can use a simple loop I think... if .offset(i,0) in one sheet is equal to .offset(i,0) in the other then do nothing. If it's not then because both columns are sorted you can insert the row from the 'lesser' value in before the row with the 'greater' value, and then move to the next loop. "ryguy7272" wrote: I am looking for a way of testing values, in Column A, on two sheets. I have a sheet named €˜Analysis of Interest Current and €˜Analysis. I know €˜Analysis of Interest Current has 7 numbers that €˜Analysis does not have; these are account numbers. I want to test the values in these two sheets, and if a number exists on €˜Analysis of Interest Current but not on €˜Analysis, then I want to copy the row and insert it, in chronological order, into €˜Analysis; insert the whole row in the cell below. For instance, I have account number 7200-0147 (just a number; no text in the cell) in €˜Analysis of Interest Current. I know this account is not in €˜Analysis, but I do have account 7200-0146 in €˜Analysis. Basically, I wanted to copy/paste the row with 7200-0147 below the row with 7200-0146. Im sure it can be done, but not sure how difficult it is. Does anyone here have such a macro, or similar code that is easily modified to do what I described above? If so, please share. TIA!!! Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to copy Range and Paste as Values (from hidden sheet) | Excel Programming | |||
Complex Question. Index/Match then Copy/Paste to Summary Sheet | Excel Programming | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming | |||
Complex identify values then cut/copy/paste query | Excel Programming | |||
Copy Sheet - Paste Values | Excel Programming |