How to extract specified data from matrix

dmb41

Board Regular
Joined
Nov 10, 2010
Messages
75
I am looking to take data from a very large matrix.

It is like the following form

--A B C D E .... CC
A 1 5 7 9 1
B 6 7 8 2 3
C 5 7 2 1 6
D 5 3 1 8 3
E 6 3 1 6 8
.
.
.

Say I want to extract the following data: A C E
and be left with something like:
--A C E ....
A 1 7 1
C 5 2 6
E 6 1 8

Is there away just to pull or extract data in these column and rows instead of manually deleted all rows. Reason is I need to do several different combos.




BTW : Is there an easy way to copy and paste the cells into this message (So its easier to visualize). Or does it have to be photo hosted?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You could use the formula in B10, copied across and down. Alternatively, you could save a lot of processing by setting up the results table like my bottom one where
A17 is copied down
C15 is copied across
C17 is copied across and down.

Excel Workbook
ABCDEFG
1ABCDE
2A15791
3B67823
4C57216
5D53183
6E63168
7
8
9ACE
10A171
11C526
12E618
13
14
15135
16ACE
171A171
183C526
195E618
20
Extract from matrix




Regarding posting screen shots ..
My signature block below contains 3 methods for posting small screen shots. Test them in the Test Here forum. That way, if something goes wrong, you won’t be messing up a main forum.
 
Upvote 0
Thank you for the two options! Exactly what I was looking for and needed. This will help very much.

Is the only way to "automate" this process by developing a macro? For example, if I just typed in the three letter A,C,E and it formed the matrix out of it.

The logic that you have provided will definitely work ... I am just wondering if there is a faster way via macro for when there are different sequences I need formed. I'm thinking it might be a nice small project to get myself more familiar with macros, if feasible.
 
Upvote 0
You certainly could set this up with a macro and it sounds like it would be a good exercise for you.

However, a fair job can be done with just formulas if you want. Try this idea.

Your list of letters gets entered in the green cells. They do not need to be in the same order as the original matrix.

A13:A14 copied down as far as you might need.
C12 copied across as far as you might need.
C14 copied across and down as far as the other formulas just mentioned above.

Excel Workbook
ABCDEFGHIJ
1ABCDE
2A15791
3B67823
4C57216
5D53183
6E63168
7
8
9
10
114
121352
13ACEB
141A1715
153C5267
165E6183
172B6837
18
19
20
21
22
23
Extract from matrix
 
Upvote 0
Thanks this gives more freedom in the sequences and will work perfect.

Thanks for your time!
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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