PC Review


Reply
Thread Tools Rate Thread

Complex Compare Values, and Copy/Paste if in One Sheet but Not Oth

 
 
ryguy7272
Guest
Posts: n/a
 
      19th Aug 2009
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.

I’m 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 With Quote
 
 
 
 
Sam Wilson
Guest
Posts: n/a
 
      19th Aug 2009
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.
>
> I’m 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 With Quote
 
ryguy7272
Guest
Posts: n/a
 
      19th Aug 2009
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.
> >
> > I’m 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy entire row and paste values only to another sheet drewship Microsoft Excel Programming 12 28th Sep 2009 01:13 PM
Compare 2 sheets, then copy/paste results if Different Values in C ryguy7272 Microsoft Excel Programming 3 31st Aug 2009 10:14 PM
Complex Question. Index/Match then Copy/Paste to Summary Sheet ryguy7272 Microsoft Excel Programming 3 9th Dec 2008 06:34 AM
How do i compare values from two sheet and copy & paste if values match? =?Utf-8?B?cm96Yg==?= Microsoft Excel Programming 0 5th Mar 2004 12:06 AM
Complex identify values then cut/copy/paste query ian123 Microsoft Excel Programming 1 24th Jan 2004 11:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:14 PM.