Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Copy/paste in based on duplicate value in previous row

Hello-

I have a spreadsheet that has some duplicate rows because the phone and fax numbers, when exported from our system, are not reported within the same record. All of the other information will be the same (customer, items, etc) the only difference will be the phone number & fax number. Columns E & F contain the phone information (Prefix & actual number) and the first record contains the fax info while the second record will be the phone info if duplication exists.

Since both records share a common sequence number, i am trying to create a macro that will look at the sequence number and if it is the same in both rows, then copy the phone number and paste it in a new column next to the fax number. I will keep the original columns for fax info and create new columns for phone info.

Fax prefix would be column E, Fax number would be column F. I have already inserted columns G (Bus Phone prefix) and H (Bus Phone number). The sequence number is in column J.

If rows 3 and 4 were duplicated for this reason, I want to look at J3, and if it is the same value as J4, then copy the values in E4:F4 and paste them to G3:H3 so that I now have the first record which shows both the fax and phone info in one record. i can then delete the second record from the file..

Please let me know how this would be written in code to do this. i appreciate the help.

Thanks

Scott
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
select and paste data based on creteria on previous cells Jerome[_6_] Excel Programming 2 June 3rd 10 04:37 PM
Copy and Paste based on criteria stacia Excel Programming 1 February 12th 10 05:42 PM
Copy and Paste based on Condition EJ Excel Discussion (Misc queries) 1 June 27th 07 11:17 PM
Copy/Paste based on Criteria Dan R. Excel Programming 2 February 5th 07 08:25 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"