Copy Data with transpose to Sheet2 from Sheet1 between 2 email address.

tajulit

Board Regular
Joined
Oct 24, 2015
Messages
111
Hi All,
I have faced a big problem. I have huge data with name, address, email. I want to copy data between 2 email address to sheet2 & transpose.

For example:
Sheet 1:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Mr Karim[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]234, by lane[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]abc@gmail.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mr rashed[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]015987456[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]365 by lane mc road[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]amik@yahoo.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mr Sumon[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]sumon@bd.net[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]khaled ali[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]sumr road[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]sumil@gmail.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2: Output
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Mr Karim[/TD]
[TD]234, by lane[/TD]
[TD]abc@gmail.com[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mr rashed[/TD]
[TD]015987456[/TD]
[TD]365 by lane mc road[/TD]
[TD]amik@yahoo.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mr Sumon[/TD]
[TD]sumon@bd.net[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]khaled ali[/TD]
[TD]sumr road[/TD]
[TD]sumil@gmail.com[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Thanks in advance
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Code:
Sub SplitonAt()
   Dim Rng As Range
   Sheets("Sheet1").Activate
   With Range("B1", Range("A" & Rows.Count).End(xlUp).Offset(, 1))
      .Value = Evaluate(Replace("if(isnumber(find(""@"",#)),true,"""")", "#", .Offset(, -1).Address))
      For Each Rng In .SpecialCells(xlBlanks).Areas
         Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1).Resize(, Rng.Count + 1).Value = Application.Transpose(Rng.Offset(, -1).Resize(Rng.Count + 1))
      Next Rng
      .Clear
   End With
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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