PC Review


Reply
Thread Tools Rate Thread

How can I extract each Max key value ?

 
 
diglas1 via OfficeKB.com
Guest
Posts: n/a
 
      30th May 2006
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.

--
Message posted via http://www.officekb.com
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      30th May 2006
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)

"diglas1 via OfficeKB.com" <u22313@uwe> wrote in message
news:61085cface8e5@uwe...
> 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.
>
> --
> Message posted via http://www.officekb.com



 
Reply With Quote
 
diglas1 via OfficeKB.com
Guest
Posts: n/a
 
      31st May 2006
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...


Bob Phillips wrote:
>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.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200605/1
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming to extract automatically extract attachments Nelson The Missing Lead Microsoft Outlook VBA Programming 1 8th Mar 2010 08:23 AM
extract vista I can extract vista from the iso file but can not ex =?Utf-8?B?ZmpqbTMwMw==?= Windows Vista General Discussion 7 20th Jun 2006 01:46 AM
Extract Unique Values, Then Extract Again to Remove Suffixes Karl Burrows Microsoft Excel Discussion 23 25th Jun 2005 10:37 PM
Extract Unique Values, Then Extract Again to Remove Suffixes Karl Burrows Microsoft Excel Misc 23 25th Jun 2005 10:37 PM
To Extract or Not to Extract that is the Question =?Utf-8?B?UmhvXzFy?= Windows XP General 0 16th Sep 2004 05:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:14 PM.