converting columns C cells to a new row under A and B -macro

osmanoca

Board Regular
Joined
Apr 16, 2016
Messages
87
Hello dear mrexcel helpfull friends. i have three columns and many rows.

this is a dictionary data.
A is word
B is meaning
C is example sentence

i want to bring C example centence to under A and B. because when i copy to word file these columns, no space to be side by side. so i need to bring example column to under word and meanig. so i need a MACRO please.

example:
A B C
1-reading xwendin xwendin tiştekî xweş e.

İ Want to be so:

A B
1- reading xwendin

2- xwendin tiştekî xweş e.
 

footoo

Well-known Member
Joined
Sep 21, 2016
Messages
2,661
Assuming no header row :

Code:
Dim lr#, rng As Range
lr = Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Range("C1:C" & lr)
Application.ScreenUpdating = False
rng.Copy Cells(lr + 1, "A")
[C1] = 1
[C1].AutoFill Destination:=rng, Type:=xlFillSeries
rng.Copy Cells(lr + 1, "C")
[A:C].Sort Key1:=[C1], Order1:=xlAscending, Header:=xlNo
[C:C].Delete
Application.ScreenUpdating = True
 
Last edited:

osmanoca

Board Regular
Joined
Apr 16, 2016
Messages
87
sorry it doesnt do anything. no name chen i click one run makro. so it doesnt see any macro. please check.

thanks

macro please..
 

L. Howard

Well-known Member
Joined
Oct 16, 2012
Messages
4,514
Try it like this.

Howard

Code:
Sub Macro_Name_is _Needed()
Dim lr#, rng As Range

lr = Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Range("C1:C" & lr)

Application.ScreenUpdating = False

rng.Copy Cells(lr + 1, "A")
[C1] = 1
[C1].AutoFill Destination:=rng, Type:=xlFillSeries
rng.Copy Cells(lr + 1, "C")
[A:C].Sort Key1:=[C1], Order1:=xlAscending, Header:=xlNo
[C:C].Delete

Application.ScreenUpdating = True

End Sub
 

osmanoca

Board Regular
Joined
Apr 16, 2016
Messages
87
Thanks dear friend. it worked with a smalle change. i only changed first row as below:
Sub anyname()


this made new row. very good. and it copies C to below row in A. is possible to come to A and B together with merging them. because so i need to merge all new row A and B to be equal lenght with word and meaning(A and B)
?
İf you can do thanks....
again..



Try it like this.

Howard

Code:
Sub Macro_Name_is _Needed()
Dim lr#, rng As Range

lr = Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Range("C1:C" & lr)

Application.ScreenUpdating = False

rng.Copy Cells(lr + 1, "A")
[C1] = 1
[C1].AutoFill Destination:=rng, Type:=xlFillSeries
rng.Copy Cells(lr + 1, "C")
[A:C].Sort Key1:=[C1], Order1:=xlAscending, Header:=xlNo
[C:C].Delete

Application.ScreenUpdating = True

End Sub
 

Forum statistics

Threads
1,082,143
Messages
5,363,374
Members
400,731
Latest member
Jackserver

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top