Copy specific cells from rows to columns

KH12

New Member
Joined
Nov 1, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Many thanks for anyone who understands and can help me with a solution.
For a sheet with hundreds of rows I need to copy specific cells from each a row to cells in a column, followed by the same cells of all next rows.

The below image ilustrates what I'm trying to accomplish.

Any ideas?

Excel.JPG
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEFGHIJKLM
1Header 1Header 2Header 3Header 4Header 5Header 6Header 7Header 8Header 9
2Value B2ABCDEValue B2A
3Value B3FGHIJValue B2B
4Value B4KLMNOValue B2C
5Value B5PQRSTValue B2D
6Value B6UVWXYValue B2E
7Value B7ZAAABACADValue B3F
8Value B8AEAFAGAHAIValue B3G
9Value B9AJAKALAMANValue B3H
10Value B3I
11Value B3J
12Value B4K
13Value B4L
14Value B4M
15Value B4N
16Value B4O
17Value B5P
18Value B5Q
19Value B5R
20Value B5S
21Value B5T
22Value B6U
23Value B6V
24Value B6W
25Value B6X
26Value B6Y
27Value B7Z
28Value B7AA
29Value B7AB
30Value B7AC
31Value B7AD
32Value B8AE
33Value B8AF
34Value B8AG
35Value B8AH
36Value B8AI
37Value B9AJ
38Value B9AK
39Value B9AL
40Value B9AM
41Value B9AN
Data
Cell Formulas
RangeFormula
L2:L41L2=TOCOL(IF(E2:I9="",a,B2:B9),3)
M2:M41M2=TOCOL(E2:I9,3)
Dynamic array formulas.
 
Upvote 0
Many thanks!
This works great, although that first colomn (L2:L41 range) does not seem to work on new sheet when referring to a range on another sheet.
For the M2:M41 range formula thos works good. Replaced the ,3 with a 0 though to include blank cells.
 
Upvote 0
Many thanks!
This works great, although that first colomn (L2:L41 range) does not seem to work on new sheet when referring to a range on another sheet.
For the M2:M41 range formula thos works good. Replaced the ,3 with a 0 though to include blank cells.
I needed add that it throws a #SPILL and later on a #CALC error when using this on a new sheet, referring to a range on another sheet.
Using the exact same formula in the same sheet works fine.
 
Upvote 0
How did you modify the two formulae to look at another sheet?
 
Upvote 0
How did you modify the two formulae to look at another sheet?
I used:

=TOCOL('CMDB input 1'!Q4:X105;0)
and
=TOCOL(IF('CMDB input 1'!Q4:X105="";a;'CMDB input 1'!F4:F105);3)

The first one works, the second one give the #SPILL error.
If I use the excat same formule in CMDB input 1 sheet it works fine.
If I use ;0 in the end is shows #Name and many more results i'd expect.
Please note that I do have blank cells in array Q4:X105, hance the ;0 in the first formula.

I dont understand the "";a;' int he formula so not sure whats happends there to correct this.
 
Upvote 0
You will get a spill error if there are non-empty cells below the formula, so you need to clear those cells.
Please note that I do have blank cells in array Q4:X105, hance the ;0 in the first formula.
In that case please provide a realistic sample of your data along with expected results.
 
Upvote 0

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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