Import entire row of data to other worksheet based on one lookup v

M

mae_bear22

I have a large set of data in one worksheet and I want to extract out
specific rows into another tab based on an identified value for each row.
The master worksheet is all customer orders from all over the USA. The rest
of the tabs are by state. For the Michigan Tab i'd like to use a lookup
statement that would copy the entire row of data for any orders from the
master onto the Michigan tab which have "MI" in the state column.

Thanks,

Stephanie
 
B

Bernie Deitrick

Stephanie,

There is no need to do that. The best way is to simply use data filters, and
filter your data based on the column with states - show MI only, and it is
the same as what you want, with the added benefit of smaller file size, no
worry about correct updating of data / formulas, etc.

HTH,
Bernie
MS Excel MVP
 
M

mae_bear22

If there is a way to do it, I'd like to know. I dont separate it by all 50
states, just by about 10 or so keeping the file size reasonable.

I know how to use filters, however I really need this data on separate tabs.

Any advice is appreciated.
 
B

Bernie Deitrick

You could:

1) Apply the filter, then copy and paste the values onto a new sheet

2) use formulas like this array formula in cell A2

=INDEX(Data!$A$1:$Z$1000,SMALL(IF(Data!$E$2:$E$1000=$E$1,ROW(Data!$E$2:$E$1000)),ROWS(A$2:A2)),COLUMN(A$1))

where you enter MI into cell E1. Copy it across for as many as 26 columns
(or increase the Z reference) and down until it returns errors.

3) use a macro

Bernie
 
M

mae_bear22

Thank you!!!!

Bernie Deitrick said:
You could:

1) Apply the filter, then copy and paste the values onto a new sheet

2) use formulas like this array formula in cell A2

=INDEX(Data!$A$1:$Z$1000,SMALL(IF(Data!$E$2:$E$1000=$E$1,ROW(Data!$E$2:$E$1000)),ROWS(A$2:A2)),COLUMN(A$1))

where you enter MI into cell E1. Copy it across for as many as 26 columns
(or increase the Z reference) and down until it returns errors.

3) use a macro

Bernie
 
S

smartin

mae_bear22 said:
I have a large set of data in one worksheet and I want to extract out
specific rows into another tab based on an identified value for each row.
The master worksheet is all customer orders from all over the USA. The rest
of the tabs are by state. For the Michigan Tab i'd like to use a lookup
statement that would copy the entire row of data for any orders from the
master onto the Michigan tab which have "MI" in the state column.

Thanks,

Stephanie

Another option is to use the seldom-leveraged MSQUERY tool, which can be
revealed in the Data | Import External Data menu. With this you can
write a SQL statement against the main table where a parameter criterion
filters on "state", then on each state page point the parameter to a
control cell that contains the desired filter value.

The beauties of the technique are:
- You never have to worry about where and when to fill a formula. When
you refresh (which can be done with one click), the data will fill the
ranges as needed.
- No added formulas consuming recalc cycles in your workbook. It's all
static data until you initiate the refresh.

And it isn't hard to do (when you know how of course). I set one up in
one minute. I can post a workbook that demonstrates this if anyone is
interested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top