Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2006

Tip: Looking for answers? Try searching our database.

How can I extract each Max key value ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
diglas1 - 30 May 2006 18:07 GMT
How can I extract the first entries for each key in Excel from the following
4 columns ?
(i.e. the maximum value of cocatenated columns 1,2 &4  e.g. JohnSmith200).  I
already concatenated the first 2 columns as the key and SUMmed the "Values"
for each key to create the "Running total" column.  

key & key    Values Running total
john smith      100      200
john smith         50     100
john smith         50       50
john thomas     50        50
bob jones         10     110
bob jones       100     100

I want:
john smith      100      200
john smith        50        50
bob jones         10     110
("Value" column though shown here, is not needed)

Thanks in anticipation.
Bob Phillips - 30 May 2006 19:23 GMT
Enter these formulae

F2: =A2
F3: =IF(ISERROR(MATCH(0,COUNTIF(F$2:F2,$A$2:$A$7&""),0)),"",
INDEX(IF(ISBLANK($A$2:$A$7),"",$A$2:$A$7),MATCH(0,COUNTIF(F$2:F2,$A$2:$A$7&"
"),0)))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter, and copy down to F7

G2: =MAX(IF($A$2:$A$7=$F2,$C$2:$C$7))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter, and copy down to G7

---
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> How can I extract the first entries for each key in Excel from the following
> 4 columns ?
[quoted text clipped - 17 lines]
>
> Thanks in anticipation.
diglas1 - 31 May 2006 23:06 GMT
Bob, thanks very much, it took me some time to work out how you arrived at
this ! ...I'm just exploring Excel macros and VBA to solve a couple of
specific problems... but it's advanced me a huge step.  Onward...

>Enter these formulae
>
[quoted text clipped - 23 lines]
>>
>> Thanks in anticipation.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.