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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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