Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello everyone... I have a problem.
What I need to do is somewhat hard to put into words. I need to do two things, at the same time, with a group of data. I have about 3,700 rows of data. Column 'B' has numeric codes in it. These are actually DOE school codes (e.g. 001253, 002561, etc.). Each one of these codes has about 5 columns associated with it. In these columns will be either the number 0, 1, 2, or 3. Below is an example: 00125300 3 3 0 0 1 00125300 0 1 2 0 3 00125300 3 3 1 2 0 00125300 1 2 3 1 2 00125300 2 0 0 3 0 In this example, you have one school (00125300) listed 5 times due to the school having 5 users. Each user has a different level of access to certain tasks, which are represented by the numers 0-3. What I need to do are the following: 1) Compare all five "users", and take the highest value and place in a single row. 2) Identify that the school is listed 5 times, and delete 4 of the duplicate entries. So, in a nutshell, in the example above, I would would want to "end up" with one row with the school code 00125300, and 5 columns of 3's... Since each column has at least one 3 in it, that would be the highest value. 00125300 3 3 3 3 3 So I need to recognize the duplicates, compare the values, take the highest, put into one row, and delete the others. Impossible? It is to me... Any help at this point would be greatly appreciated!! Thank you all for taking the time to try to make sense of this!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...
Add a new worksheet back to the original sheet Add some headers. sort your data by column A (DOE codes) Select your range and do Data|subtotals Choose MAX as the function to use for each of those 5 columns When you finish up, you'll see outlining symbols on the left hand side. Use those to show just the subtotals (click the 2 box at the top) Select the visible cells edit|goto|special|check visible cells only Copy those visible cells Paste into that new workbook. And then select column A of the new worksheet edit|Replace what: _Max (spacebar MAX) with: (leave blank) replace all Get rid of the bold formatting stacy wrote: Hello everyone... I have a problem. What I need to do is somewhat hard to put into words. I need to do two things, at the same time, with a group of data. I have about 3,700 rows of data. Column 'B' has numeric codes in it. These are actually DOE school codes (e.g. 001253, 002561, etc.). Each one of these codes has about 5 columns associated with it. In these columns will be either the number 0, 1, 2, or 3. Below is an example: 00125300 3 3 0 0 1 00125300 0 1 2 0 3 00125300 3 3 1 2 0 00125300 1 2 3 1 2 00125300 2 0 0 3 0 In this example, you have one school (00125300) listed 5 times due to the school having 5 users. Each user has a different level of access to certain tasks, which are represented by the numers 0-3. What I need to do are the following: 1) Compare all five "users", and take the highest value and place in a single row. 2) Identify that the school is listed 5 times, and delete 4 of the duplicate entries. So, in a nutshell, in the example above, I would would want to "end up" with one row with the school code 00125300, and 5 columns of 3's... Since each column has at least one 3 in it, that would be the highest value. 00125300 3 3 3 3 3 So I need to recognize the duplicates, compare the values, take the highest, put into one row, and delete the others. Impossible? It is to me... Any help at this point would be greatly appreciated!! Thank you all for taking the time to try to make sense of this!! -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Awesome! Perfect!! What else can I say!!!
This will work perfectly!! However, a couple of questions that I am sure I am missing: After the sorting took place, I got this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 00125300 3 3 0 0 1 00125300 0 1 2 0 3 00125300 3 3 1 2 0 00125300 1 2 3 1 2 00125300 2 0 0 0 0 00125300 Max 3 3 3 2 3 Grand Max 3 3 3 2 3 After I click '2' for the outline, I get this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 00125300 Max 3 3 3 2 3 Grand Max 3 3 3 2 3 After I copy the visible cells to a new workbook, and then select column A of the new worksheet edit|Replace what: _Max (spacebar MAX) with: (leave blank) replace all... I get this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 125300 3 3 3 2 3 Grand 3 3 3 2 3 ... My question(s) a 1) Can I get rid of the 'Grand' row all together? 2) I need to retain the leading zeros in the DOE code (assuming this is just destination cell formatting) I can't thank you enough for your help already Dave... INVALUABLE!! *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can just delete that Grand Max row (Or omit it from the range to copy).
And when you change _max to "", excel thinks that your just reentering numbers. You could either give that range/column a nice custom format: select the range format|cells|number tab|custom category 00000000 But the value will still be 125300, but it'll look like 00125300. Or you could insert a helper column and remove the _max that way: Say you insert a new column A. Then you can put this in A2 and drag down: =substitute(b2," max","") and drag down Select the range Edit|copy select B2 edit|Paste special|values and delete that helper column (column A). Stacy McMillan wrote: Awesome! Perfect!! What else can I say!!! This will work perfectly!! However, a couple of questions that I am sure I am missing: After the sorting took place, I got this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 00125300 3 3 0 0 1 00125300 0 1 2 0 3 00125300 3 3 1 2 0 00125300 1 2 3 1 2 00125300 2 0 0 0 0 00125300 Max 3 3 3 2 3 Grand Max 3 3 3 2 3 After I click '2' for the outline, I get this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 00125300 Max 3 3 3 2 3 Grand Max 3 3 3 2 3 After I copy the visible cells to a new workbook, and then select column A of the new worksheet edit|Replace what: _Max (spacebar MAX) with: (leave blank) replace all... I get this: Code Rank 1 Rank 2 Rank 3 Rank 4 Rank 5 125300 3 3 3 2 3 Grand 3 3 3 2 3 .. My question(s) a 1) Can I get rid of the 'Grand' row all together? 2) I need to retain the leading zeros in the DOE code (assuming this is just destination cell formatting) I can't thank you enough for your help already Dave... INVALUABLE!! *** Sent via Developersdex http://www.developersdex.com *** -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cool... Everything has worked perfectly... One final question if you
don't mind though... Is there an easy way to add the corresponding name to the outlined "max" row? Meaning, I get the following: Name Code A B C Nelnet 00125300 3 2 0 Nelnet 00125300 0 1 3 Nelnet 00125300 1 0 1 00125300 Max 3 2 3 On the row with 'Max', is there an easy way to carry down the 'Nelnet' name? I was thinking I could use vlookup on another sheet, and just find corresponding DOE code, and place the name in there... THought I would see if there may be a simpler, cleaner method though. Thanks again for the enormous help. It is just was I was looking for... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah, you've changed what you wanted!
Hide just the details and just show those subtotal lines. Select A2:Axxx (avoid the header and avoid the grandtotal line) edit|goto|special|visible cells only. Now notice the cell that you're in (look at the name box to the left of the formulabar). If you're in A19, then type: =a18 and hit ctrl-enter This will fill the selected cells with a formula that points at the previous cell. You can show all the data and then select the column and edit|Copy, edit|Paste special|values if you want. stacy wrote: Cool... Everything has worked perfectly... One final question if you don't mind though... Is there an easy way to add the corresponding name to the outlined "max" row? Meaning, I get the following: Name Code A B C Nelnet 00125300 3 2 0 Nelnet 00125300 0 1 3 Nelnet 00125300 1 0 1 00125300 Max 3 2 3 On the row with 'Max', is there an easy way to carry down the 'Nelnet' name? I was thinking I could use vlookup on another sheet, and just find corresponding DOE code, and place the name in there... THought I would see if there may be a simpler, cleaner method though. Thanks again for the enormous help. It is just was I was looking for... -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or you could use a Pivot Table. Put the code in the Row Field and the
max of the access leve colums in the Data Field. Regards Rowan stacy wrote: Hello everyone... I have a problem. What I need to do is somewhat hard to put into words. I need to do two things, at the same time, with a group of data. I have about 3,700 rows of data. Column 'B' has numeric codes in it. These are actually DOE school codes (e.g. 001253, 002561, etc.). Each one of these codes has about 5 columns associated with it. In these columns will be either the number 0, 1, 2, or 3. Below is an example: 00125300 3 3 0 0 1 00125300 0 1 2 0 3 00125300 3 3 1 2 0 00125300 1 2 3 1 2 00125300 2 0 0 3 0 In this example, you have one school (00125300) listed 5 times due to the school having 5 users. Each user has a different level of access to certain tasks, which are represented by the numers 0-3. What I need to do are the following: 1) Compare all five "users", and take the highest value and place in a single row. 2) Identify that the school is listed 5 times, and delete 4 of the duplicate entries. So, in a nutshell, in the example above, I would would want to "end up" with one row with the school code 00125300, and 5 columns of 3's... Since each column has at least one 3 in it, that would be the highest value. 00125300 3 3 3 3 3 So I need to recognize the duplicates, compare the values, take the highest, put into one row, and delete the others. Impossible? It is to me... Any help at this point would be greatly appreciated!! Thank you all for taking the time to try to make sense of this!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Condensing VBA code | Excel Discussion (Misc queries) | |||
Condensing a list with duplicates to a list with non-duplicates | Excel Worksheet Functions | |||
Condensing Columns | New Users to Excel | |||
Condensing data from 3D to 2D | Excel Worksheet Functions | |||
Condensing Formula | Excel Discussion (Misc queries) |