How to copy down from 2 columns

Pumperkin

Board Regular
Joined
Jan 24, 2019
Messages
57
Hi,

I have data in column D, and data in column E. I want to move this to column F (for printing) so that it runs

D1
E1
D2
E2
D3
E3

Etc.

I can pull the data D1 into F1, and E1 into F2, but when copying down, it does it like so:

D1
E1
D3
E3
D5
E5

Is it possible to have it so that the missing ones are included?
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
9,148
Try this macro:
Code:
Sub Pumperkin()
    Application.ScreenUpdating = False
    Dim LastRow As Long, rng As Range, x As Long, y As Long: y = 1
    LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    For x = 1 To LastRow
        Cells(y, 6).Resize(2) = WorksheetFunction.Transpose(Cells(x, 4).Resize(, 2))
        y = y + 2
    Next x
    Application.ScreenUpdating = True
End Sub
 

Pumperkin

Board Regular
Joined
Jan 24, 2019
Messages
57
Well thanks so much - after fiddling trying to work out how on earth to use macros, I managed to get it to work. You are a star :)
 

Pumperkin

Board Regular
Joined
Jan 24, 2019
Messages
57
Well thanks so much - after fiddling trying to work out how on earth to use macros, I managed to get it to work. You are a star :)
Hi, Just to follow on from this, I now have data in columns A through to F, that I wish to convert like this:

A1
B1
C1
D1
E1
F1

These are addresses - I have tidied them as much as I can but can't how to modify the previous Macro (and not quite sure if it's the same thing).

Any help gladly received.
 

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
9,148
Can you post a screen shot of what your data looks like? Section B at this link has instructions on how to post a screen shot: https://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html Alternately, you could upload a copy of your file to a free site such as www.box.com. or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Include a detailed explanation of what you would like to do referring to specific cells, rows, columns and worksheets. If the workbook contains confidential information, you could replace it with generic data.
 

Pumperkin

Board Regular
Joined
Jan 24, 2019
Messages
57
Can you post a screen shot of what your data looks like? Section B at this link has instructions on how to post a screen shot: https://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html Alternately, you could upload a copy of your file to a free site such as www.box.com. or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Include a detailed explanation of what you would like to do referring to specific cells, rows, columns and worksheets. If the workbook contains confidential information, you could replace it with generic data.
Thanks Mumps. I managed to sort it a different way, by indirect reference and copying across :)
 

Watch MrExcel Video

Forum statistics

Threads
1,101,956
Messages
5,483,873
Members
407,418
Latest member
VaugHeat

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top