ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Extracting data from two columns (https://www.excelbanter.com/excel-discussion-misc-queries/48050-extracting-data-two-columns.html)

Dan

Extracting data from two columns
 
I have data in B1-B1000+ and C1-C1000+ that I need in column A. The problem
is that column B & C are filled with data. Column A has specific cells that
the data needs to go into. In the example below B1 and C1 represent the data
from columns B & C that need to be in A2 and A3. And b2 and c2 need to be in
A7 and A8. This pattern continues for 1000+ rows.
Thank you in advance!

A B C
1 $$un $$tdp $$dac
2 B1 $$tdp $$dac
3 C1 $$tdp $$dac
4 pause $$tdp $$dac
5 $$tdp $$dac
6 $$un $$tdp $$dac
7 B2 $$tdp $$dac
8 C2 $$tdp $$dac
9 pause $$tdp $$dac
10

Otto Moehrbach

Dan
What you have given us is not a pattern. You have given us 2 points.
Two points does not make a pattern. Where does the data in B3 and C3 go?
And B4 and C4? Or is the location of "$$un" in Column A the key and each
subsequent row of Columns B & C goes after the next $$un? HTH Otto
"Dan" wrote in message
...
I have data in B1-B1000+ and C1-C1000+ that I need in column A. The problem
is that column B & C are filled with data. Column A has specific cells
that
the data needs to go into. In the example below B1 and C1 represent the
data
from columns B & C that need to be in A2 and A3. And b2 and c2 need to be
in
A7 and A8. This pattern continues for 1000+ rows.
Thank you in advance!

A B C
1 $$un $$tdp $$dac
2 B1 $$tdp $$dac
3 C1 $$tdp $$dac
4 pause $$tdp $$dac
5 $$tdp $$dac
6 $$un $$tdp $$dac
7 B2 $$tdp $$dac
8 C2 $$tdp $$dac
9 pause $$tdp $$dac
10




Dan

My example became jammed together after posting. The pattern if you will is
every 5 cells in A. B1 to A2, B2 to A7, B3 to A12, B4 to A17, etc. Same is
true for C1 to A3, C2 to A8, C3 to A13, C4 to A18, etc. I can send an example
in XL if that helps.
Thanks

"Otto Moehrbach" wrote:

Dan
What you have given us is not a pattern. You have given us 2 points.
Two points does not make a pattern. Where does the data in B3 and C3 go?
And B4 and C4? Or is the location of "$$un" in Column A the key and each
subsequent row of Columns B & C goes after the next $$un? HTH Otto
"Dan" wrote in message
...
I have data in B1-B1000+ and C1-C1000+ that I need in column A. The problem
is that column B & C are filled with data. Column A has specific cells
that
the data needs to go into. In the example below B1 and C1 represent the
data
from columns B & C that need to be in A2 and A3. And b2 and c2 need to be
in
A7 and A8. This pattern continues for 1000+ rows.
Thank you in advance!

A B C
1 $$un $$tdp $$dac
2 B1 $$tdp $$dac
3 C1 $$tdp $$dac
4 pause $$tdp $$dac
5 $$tdp $$dac
6 $$un $$tdp $$dac
7 B2 $$tdp $$dac
8 C2 $$tdp $$dac
9 pause $$tdp $$dac
10





Herbert Seidenberg

Select all data in columns B and C
Insert Name Define Names in Workbook: array_u
Also define these names:
rown Refers to: =FLOOR(ROW()-1,5)/5+1
coln Refers to: =IF(MOD(ROW(),5)=2,1,IF(MOD(ROW(),5)=3,2,3))
Enter this formula into A1 and copy down
=IF(coln<3,INDEX(array_u,rown,coln),"")


Dan

Thanks! I also messed around using a new column and the INDIRECT feature.
Thanks again for your help

"Herbert Seidenberg" wrote:

Select all data in columns B and C
Insert Name Define Names in Workbook: array_u
Also define these names:
rown Refers to: =FLOOR(ROW()-1,5)/5+1
coln Refers to: =IF(MOD(ROW(),5)=2,1,IF(MOD(ROW(),5)=3,2,3))
Enter this formula into A1 and copy down
=IF(coln<3,INDEX(array_u,rown,coln),"")




All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com