Looking for excel Formula to Move multiple data to specific columns

%3CLINGO-SUB%20id%3D%22lingo-sub-2654697%22%20slang%3D%22en-US%22%3ELooking%20for%20excel%20Formula%20to%20Move%20multiple%20data%20to%20specific%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2654697%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20running%20windows%2010%20on%20my%20Surface%20pro%206%20using%202017%20Microsoft%20Excel%20.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20astrological%20midpoints%26nbsp%3B%20ex%3A%20abcd%20cell%20A3%20%2C%20efgh%20A7%20%26amp%3B%20ijkl%26nbsp%3B%20A11)%20with%20two%20sets%20of%20delineations.%3C%2FP%3E%3CP%3E(cell%20A4%2C%20A8%20%26amp%3B%20A12)%20psychological%3C%2FP%3E%3CP%3E(cell%20A5%2C%20%2C%20A9%20%2C%20%26amp%3B%20A13)%20physical.%3C%2FP%3E%3CP%3EThis%20is%20for%20roughly%20350%20differing%20midpoints.%3C%2FP%3E%3CP%3EI%20need%20to%20move%20the%20delineations%20to%20their%20own%20columns%20which%20would%20be%20column%20columnB%20%26amp%3B%20C%3C%2FP%3E%3CP%3EColumn%20B%20would%20be%20for%20the%20psychological%3C%2FP%3E%3CP%3EColumn%20C%20for%20the%20physical%3C%2FP%3E%3CP%3EThe%20asterick%20shown%20on%20the%20attached%20example%20is%20on%20my%20actual%20spreadsheet.%3C%2FP%3E%3CP%3EThey%20pulled%20in%20from%20the%20source%20imported%20from.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20move%20them%20with%20a%20specific%20formula%20to%20their%20own%26nbsp%3B%20columns%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2654697%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2655189%22%20slang%3D%22en-US%22%3ERe%3A%20Looking%20for%20excel%20Formula%20to%20Move%20multiple%20data%20to%20specific%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2655189%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1130011%22%20target%3D%22_blank%22%3E%40Cherbpt%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFormulas%20can%20return%20values%20from%20the%20referenced%20cells%20but%20they%20cannot%20move%20cell%20values.%20For%20that%2C%20you%20will%20need%20VBA.%3C%2FP%3E%3CP%3EModule1%20in%20the%20attached%20contains%20the%20following%20code%20and%20contains%20a%20button%20called%20%22Transpose%20Data%22%20on%20Sheet1%20which%20you%20may%20click%20to%20run%20the%20code%20and%20the%20code%20will%20transpose%20the%20data%20in%20the%20desired%20format.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-visual-basic%22%3E%3CCODE%3ESub%20TransformData()%0ADim%20lr%20%20%20%20%20%20As%20Long%0ADim%20Rng%20%20%20%20%20As%20Range%0ADim%20RngArea%20As%20Range%0ADim%20arr%20%20%20%20%20As%20Variant%0ADim%20i%20%20%20%20%20%20%20As%20Long%0A%0Alr%20%3D%20Cells(Rows.Count%2C%201).End(xlUp).Row%0A%0AApplication.ScreenUpdating%20%3D%20False%0A%0AOn%20Error%20Resume%20Next%0ASet%20RngArea%20%3D%20Range(%22A1%3AA%22%20%26amp%3B%20lr).SpecialCells(xlCellTypeConstants%2C%202)%0AOn%20Error%20GoTo%200%0AIf%20RngArea%20Is%20Nothing%20Then%20Exit%20Sub%0AReDim%20arr(1%20To%20RngArea.Areas.Count%2C%201%20To%203)%0AFor%20Each%20Rng%20In%20RngArea.Areas%0A%20%20%20%20If%20Rng.Cells.Count%20%3D%203%20Then%0A%20%20%20%20%20%20%20%20i%20%3D%20i%20%2B%201%0A%20%20%20%20%20%20%20%20arr(i%2C%201)%20%3D%20Rng.Cells(1).Value%0A%20%20%20%20%20%20%20%20arr(i%2C%202)%20%3D%20Rng.Cells(2).Value%0A%20%20%20%20%20%20%20%20arr(i%2C%203)%20%3D%20Rng.Cells(2).Value%0A%20%20%20%20End%20If%0ANext%20Rng%0A%0AColumns(1).Clear%0ARange(%22A2%22).Resize(UBound(arr%2C%201)%2C%203).Value%20%3D%20arr%0AActiveSheet.UsedRange.Columns.AutoFit%0AApplication.ScreenUpdating%20%3D%20True%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am running windows 10 on my Surface pro 6 using 2017 Microsoft Excel .

 

I have astrological midpoints  ex: abcd cell A3 , efgh A7 & ijkl  A11) with two sets of delineations.

(cell A4, A8 & A12) psychological

(cell A5, , A9 , & A13) physical.

This is for roughly 350 differing midpoints.

I need to move the delineations to their own columns which would be column columnB & C

Column B would be for the psychological

Column C for the physical

The asterick shown on the attached example is on my actual spreadsheet.

They pulled in from the source imported from.

 

Is there a way to move them with a specific formula to their own  columns 

 

 

 

3 Replies

@Cherbpt 

Formulas can return values from the referenced cells but they cannot move cell values. For that, you will need VBA.

Module1 in the attached contains the following code and contains a button called "Transpose Data" on Sheet1 which you may click to run the code and the code will transpose the data in the desired format.

 

Sub TransformData()
Dim lr      As Long
Dim Rng     As Range
Dim RngArea As Range
Dim arr     As Variant
Dim i       As Long

lr = Cells(Rows.Count, 1).End(xlUp).Row

Application.ScreenUpdating = False

On Error Resume Next
Set RngArea = Range("A1:A" & lr).SpecialCells(xlCellTypeConstants, 2)
On Error GoTo 0
If RngArea Is Nothing Then Exit Sub
ReDim arr(1 To RngArea.Areas.Count, 1 To 3)
For Each Rng In RngArea.Areas
    If Rng.Cells.Count = 3 Then
        i = i + 1
        arr(i, 1) = Rng.Cells(1).Value
        arr(i, 2) = Rng.Cells(2).Value
        arr(i, 3) = Rng.Cells(2).Value
    End If
Next Rng

Columns(1).Clear
Range("A2").Resize(UBound(arr, 1), 3).Value = arr
ActiveSheet.UsedRange.Columns.AutoFit
Application.ScreenUpdating = True
End Sub

 

wow ty so so much! Have an awesome day!

You're welcome @Cherbpt! Glad it worked as desired.

 

Please take a minute to accept the post with the proposed solution as a Best Response to mark your question as Solved.