LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Roland
 
Posts: n/a
Default Formula to copy rng of cells where (value is met) to anther sheet

Brian,

I have here a rudimentary solution. It can be tweaked, but for a quick
solution this will work.

Put a helper column in column A of your "Primary" sheet, using the row()
function, to create a sequential list. Your data should now look something
like this, with the headings in row 1.

COL A COL B COL C
Row ID DATA
2 44 1
3 44 2
4 68 3
5 68 4
6 28 5
7 28 5
8 28 5
9 28 5
10 28 5
11 28 5
12 28 6

Now on another sheet, using the sheet name "Loc28", put the heading Row
in cell A1.

In cell A2 type this formula
=MIN(IF((Primary!$A$1:$A$12A2)*(Primary!$B$1:$B$1 2=28),Primary!$A$1:$A$12)).
Use <ctrl <shift <enter to make it an array formula. You should see { }
brackets around the formula. (Use a longer range that to A12 and B12 to
match your data.)

Cell A2 will ready as zero. Copy the formula down a few cells. You'll
now see data as below, representing rows from the "Primary" sheet.

Row
0
6
7
8
9
10
11
12
0

When it gets to zero, here after the 12, you can erase that row and those
below it, for it will repeat.

Now use the VLOOKUP function to lookup data based on the Row values.

Then repeat, using sheets for your other two locations, 44 and 68.

Tweaking the array formula to test for text values can eliminate the
leading zero and another tweak can eliminate the repeats, turning them into
99999's or some such, but that would complicate the array formula too much
for this discussion. Do that later.










Exit Advantage" wrote:

I have one sheet that contains info for all three office locations. One
column on this sheet contains location ID. I want to create three seperate
sheets for each office, then have a formula that will copy the info from a
row on the primary sheet to respective office sheet. Office locations are 28,
44 and 68. So if column c on main sheet =28 then copy all rows where column c
= 28 to 28 sheet, etc with 44 and 68. Please help, I can't figure it out.

Thanks,
Brian

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy values generated by conditional formula in one sheet to the other work sheet as values ramana Excel Worksheet Functions 1 October 5th 05 01:04 PM
copy values generated by conditional formula in one sheet to the other work sheet as values bobby Excel Discussion (Misc queries) 1 October 5th 05 12:18 PM
Edit / Move or copy sheet stopped working in Excel 2003 kris2u Excel Worksheet Functions 0 October 4th 05 08:20 PM
Formula works in some cells, doesn't in other Wowbagger New Users to Excel 13 June 30th 05 03:21 PM
Howdo U copy a formula down a column, that uses data in another w. Need Help pasting a formula Excel Worksheet Functions 1 February 25th 05 06:04 PM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"