Need Help. Please

its_subu

New Member
Joined
Nov 19, 2005
Messages
7
Hello
Nice to see this site.

I have an long excel sheet of the following format

Number Name Id address phone fax
1 aa 2 abcd 123
1 aa 2 abcd 456
2 bb 3 qwer 789
2 bb 3 qwer 111


456 and 111 are fax nos where as 123 and 789 are phone numbers. How do I merge 1 and 1 which has identical values and fill the fax value in the first field.

Please let me know.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the Board!

You can concatenate cells with the ampersand. I.E. =A1&B1

As for fillin the FAX field, I'm not exactly sure what you mean (how do you know the difference between a FAX & non-Fax #?). Can you post a shot of your sheet? Colo's HTML Maker (the link's at the bottom of the page) will let you do that.

Hope that helps,

Smitty
 
Upvote 0
Assuming the first row of actual data is in A2, this works:

Code:
Sub MoveFax()

Dim RowIncrement As Integer

Range("A2").Select

For RowIncrement = 1 To 20000 ' Enter how many rows you have here

If ActiveCell.Offset(1, 0).Value = "" Then Exit For
        
ActiveCell.Offset(1, 4).Range("A1").Copy
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.Select
    
Next RowIncrement

End Sub
 
Upvote 0
Screen shots pasted

Hello
The first screen shot is what Im having. The desired result is also below. Please advice. Also I dont know why nbsp is coming. They are supposed to be blank fields.
Book1.xls
ABCDEFGH
1IdNameLocationaddressstateSitenophoneFax
210001JohnBuildingA1WestAveNYSITE00001(000)999-2222
310001JohnBuildingA1WestAveNYSITE00001(111)222-4444
410002peterBuildingB13KarelAvenueNYSITE00720(111)222-3333
510002peterBuildingB13KarelAvenueNYSITE00720(111)384-2000
Sheet3




Result needed is
Book1.xls
ABCDEFGH
2IdNameLocationaddressstateSitenophoneFax
310001JohnBuildingA1WestAveNYSITE00001(000)999-2222(111)222-4444
410002peterBuildingB13KarelAvenueNYSITE00720(111)222-3333(111)384-2000
Sheet2
 
Upvote 0

Forum statistics

Threads
1,206,945
Messages
6,075,782
Members
446,156
Latest member
Aaro23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top