#### Need largest number

I have a file in Excel 2003.  In 1 column I have a numeric field.  In the
next column I have a 2 digit apha field.  In the third column I have another
numeric field.  For each row I need a formula in the 4th column.

All columns can have duplicate numbers/characters.  What I need to do is
find the largest number if column 3 for the unique combination of columns 1
and 2.

Example:
Col A      Col B      Col C      Col D (to be reult is shown - need formula)
12345     AA          1           5
12345     AA          1           5
12345     AA          2           5
98765     BA          2           2
98765     BA          1           2
12345     AA          5           5
98765     BA           2          2

Thank you.
 0
Utf
6/7/2010 5:03:28 PM
excel.programming 6508 articles. 2 followers.

6 Replies
1845 Views

Similar Articles

[PageSpeed] 56

Assuming your data starts in Row 1, put this formula in D1 and copy it
down...

=SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))

Change all the 1000's to a row number that will be larger than the largest
row number you ever expect to put data in.

--
Rick (MVP - Excel)

news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
> I have a file in Excel 2003.  In 1 column I have a numeric field.  In the
> next column I have a 2 digit apha field.  In the third column I have
> another
> numeric field.  For each row I need a formula in the 4th column.
>
> All columns can have duplicate numbers/characters.  What I need to do is
> find the largest number if column 3 for the unique combination of columns
> 1
> and 2.
>
> Example:
> Col A      Col B      Col C      Col D (to be reult is shown - need
> formula)
> 12345     AA          1           5
> 12345     AA          1           5
> 12345     AA          2           5
> 98765     BA          2           2
> 98765     BA          1           2
> 12345     AA          5           5
> 98765     BA           2          2
>
> Thank you.

 0
Rick
6/7/2010 5:23:57 PM
That's not working.  I get the result #VALUE

"Rick Rothstein" wrote:

> Assuming your data starts in Row 1, put this formula in D1 and copy it
> down...
>
> =SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))
>
> Change all the 1000's to a row number that will be larger than the largest
> row number you ever expect to put data in.
>
> --
> Rick (MVP - Excel)
>
>
>
> news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
> > I have a file in Excel 2003.  In 1 column I have a numeric field.  In the
> > next column I have a 2 digit apha field.  In the third column I have
> > another
> > numeric field.  For each row I need a formula in the 4th column.
> >
> > All columns can have duplicate numbers/characters.  What I need to do is
> > find the largest number if column 3 for the unique combination of columns
> > 1
> > and 2.
> >
> > Example:
> > Col A      Col B      Col C      Col D (to be reult is shown - need
> > formula)
> > 12345     AA          1           5
> > 12345     AA          1           5
> > 12345     AA          2           5
> > 98765     BA          2           2
> > 98765     BA          1           2
> > 12345     AA          5           5
> > 98765     BA           2          2
> >
> > Thank you.
>
> .
>
 0
Utf
6/7/2010 7:11:05 PM
The formula works here for the data you provided to us, so I have to ask to
be sure... did you copy/paste my formula into your worksheet or did you
attempt to type it longhand (possibly introducing a typing error in the
process)? If you copy/pasted it, then I have to conclude your data is
different in some way from what you posted. Again, if you copy/pasted the
formula in and it is not working, then you can send me your workbook and
I'll see if I can spot what the problem is. If you do send it to me, make
sure to remove the NO.SPAM stuff from my address.

--
Rick (MVP - Excel)

news:7D7CF581-FBF2-4EC3-90E4-CB45B00C0471@microsoft.com...
> That's not working.  I get the result #VALUE
>
> "Rick Rothstein" wrote:
>
>> Assuming your data starts in Row 1, put this formula in D1 and copy it
>> down...
>>
>> =SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))
>>
>> Change all the 1000's to a row number that will be larger than the
>> largest
>> row number you ever expect to put data in.
>>
>> --
>> Rick (MVP - Excel)
>>
>>
>>
>> news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
>> > I have a file in Excel 2003.  In 1 column I have a numeric field.  In
>> > the
>> > next column I have a 2 digit apha field.  In the third column I have
>> > another
>> > numeric field.  For each row I need a formula in the 4th column.
>> >
>> > All columns can have duplicate numbers/characters.  What I need to do
>> > is
>> > find the largest number if column 3 for the unique combination of
>> > columns
>> > 1
>> > and 2.
>> >
>> > Example:
>> > Col A      Col B      Col C      Col D (to be reult is shown - need
>> > formula)
>> > 12345     AA          1           5
>> > 12345     AA          1           5
>> > 12345     AA          2           5
>> > 98765     BA          2           2
>> > 98765     BA          1           2
>> > 12345     AA          5           5
>> > 98765     BA           2          2
>> >
>> > Thank you.
>>
>> .
>>
 0
Rick
6/7/2010 7:33:00 PM

> I copied and pasted it this time and here's the result:
> 12345	AA	1	1
> 12345	AA 	1	5
> 12345	AA 	2	5
> 98765	BA 	2	2
> 98765	BA 	1	2
> 12345	AA 	5	5
> 98765	BA 	2	2
>
> The first row is wrong as it should also be 5 just like the one below it.
> It's almost there.  :)  Thanks so much.
>
> "Rick Rothstein" wrote:
>
> > The formula works here for the data you provided to us, so I have to ask to
> > be sure... did you copy/paste my formula into your worksheet or did you
> > attempt to type it longhand (possibly introducing a typing error in the
> > process)? If you copy/pasted it, then I have to conclude your data is
> > different in some way from what you posted. Again, if you copy/pasted the
> > formula in and it is not working, then you can send me your workbook and
> > I'll see if I can spot what the problem is. If you do send it to me, make
> > sure to remove the NO.SPAM stuff from my address.
> >
> > --
> > Rick (MVP - Excel)
> >
> >
> >
> > news:7D7CF581-FBF2-4EC3-90E4-CB45B00C0471@microsoft.com...
> > > That's not working.  I get the result #VALUE
> > >
> > > "Rick Rothstein" wrote:
> > >
> > >> Assuming your data starts in Row 1, put this formula in D1 and copy it
> > >> down...
> > >>
> > >> =SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))
> > >>
> > >> Change all the 1000's to a row number that will be larger than the
> > >> largest
> > >> row number you ever expect to put data in.
> > >>
> > >> --
> > >> Rick (MVP - Excel)
> > >>
> > >>
> > >>
> > >> news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
> > >> > I have a file in Excel 2003.  In 1 column I have a numeric field.  In
> > >> > the
> > >> > next column I have a 2 digit apha field.  In the third column I have
> > >> > another
> > >> > numeric field.  For each row I need a formula in the 4th column.
> > >> >
> > >> > All columns can have duplicate numbers/characters.  What I need to do
> > >> > is
> > >> > find the largest number if column 3 for the unique combination of
> > >> > columns
> > >> > 1
> > >> > and 2.
> > >> >
> > >> > Example:
> > >> > Col A      Col B      Col C      Col D (to be reult is shown - need
> > >> > formula)
> > >> > 12345     AA          1           5
> > >> > 12345     AA          1           5
> > >> > 12345     AA          2           5
> > >> > 98765     BA          2           2
> > >> > 98765     BA          1           2
> > >> > 12345     AA          5           5
> > >> > 98765     BA           2          2
> > >> >
> > >> > Thank you.
> > >>
> > >> .
> > >>
> > .
> >
 0
Utf
6/7/2010 8:22:58 PM
I copied and pasted it this time and here's the result:
12345	AA	1	1
12345	AA 	1	5
12345	AA 	2	5
98765	BA 	2	2
98765	BA 	1	2
12345	AA 	5	5
98765	BA 	2	2

The first row is wrong as it should also be 5 just like the one below it.
It's almost there.  :)  Thanks so much.

"Rick Rothstein" wrote:

> The formula works here for the data you provided to us, so I have to ask to
> be sure... did you copy/paste my formula into your worksheet or did you
> attempt to type it longhand (possibly introducing a typing error in the
> process)? If you copy/pasted it, then I have to conclude your data is
> different in some way from what you posted. Again, if you copy/pasted the
> formula in and it is not working, then you can send me your workbook and
> I'll see if I can spot what the problem is. If you do send it to me, make
> sure to remove the NO.SPAM stuff from my address.
>
> --
> Rick (MVP - Excel)
>
>
>
> news:7D7CF581-FBF2-4EC3-90E4-CB45B00C0471@microsoft.com...
> > That's not working.  I get the result #VALUE
> >
> > "Rick Rothstein" wrote:
> >
> >> Assuming your data starts in Row 1, put this formula in D1 and copy it
> >> down...
> >>
> >> =SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))
> >>
> >> Change all the 1000's to a row number that will be larger than the
> >> largest
> >> row number you ever expect to put data in.
> >>
> >> --
> >> Rick (MVP - Excel)
> >>
> >>
> >>
> >> news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
> >> > I have a file in Excel 2003.  In 1 column I have a numeric field.  In
> >> > the
> >> > next column I have a 2 digit apha field.  In the third column I have
> >> > another
> >> > numeric field.  For each row I need a formula in the 4th column.
> >> >
> >> > All columns can have duplicate numbers/characters.  What I need to do
> >> > is
> >> > find the largest number if column 3 for the unique combination of
> >> > columns
> >> > 1
> >> > and 2.
> >> >
> >> > Example:
> >> > Col A      Col B      Col C      Col D (to be reult is shown - need
> >> > formula)
> >> > 12345     AA          1           5
> >> > 12345     AA          1           5
> >> > 12345     AA          2           5
> >> > 98765     BA          2           2
> >> > 98765     BA          1           2
> >> > 12345     AA          5           5
> >> > 98765     BA           2          2
> >> >
> >> > Thank you.
> >>
> >> .
> >>
> .
>
 0
Utf
6/7/2010 8:23:05 PM
Rick,

I sent you the file in hopes you can help again.  It doesn't seem to work in
the actual file although it works in the test file of the sample I gave.
THanks.

"Rick Rothstein" wrote:

> The formula works here for the data you provided to us, so I have to ask to
> be sure... did you copy/paste my formula into your worksheet or did you
> attempt to type it longhand (possibly introducing a typing error in the
> process)? If you copy/pasted it, then I have to conclude your data is
> different in some way from what you posted. Again, if you copy/pasted the
> formula in and it is not working, then you can send me your workbook and
> I'll see if I can spot what the problem is. If you do send it to me, make
> sure to remove the NO.SPAM stuff from my address.
>
> --
> Rick (MVP - Excel)
>
>
>
> news:7D7CF581-FBF2-4EC3-90E4-CB45B00C0471@microsoft.com...
> > That's not working.  I get the result #VALUE
> >
> > "Rick Rothstein" wrote:
> >
> >> Assuming your data starts in Row 1, put this formula in D1 and copy it
> >> down...
> >>
> >> =SUMPRODUCT(MAX((A\$1:A\$1000&B\$1:B\$1000=A1&B1)*C\$1:C\$1000))
> >>
> >> Change all the 1000's to a row number that will be larger than the
> >> largest
> >> row number you ever expect to put data in.
> >>
> >> --
> >> Rick (MVP - Excel)
> >>
> >>
> >>
> >> news:14AAC184-B396-4F0E-AE3F-FC3D96CAB7D1@microsoft.com...
> >> > I have a file in Excel 2003.  In 1 column I have a numeric field.  In
> >> > the
> >> > next column I have a 2 digit apha field.  In the third column I have
> >> > another
> >> > numeric field.  For each row I need a formula in the 4th column.
> >> >
> >> > All columns can have duplicate numbers/characters.  What I need to do
> >> > is
> >> > find the largest number if column 3 for the unique combination of
> >> > columns
> >> > 1
> >> > and 2.
> >> >
> >> > Example:
> >> > Col A      Col B      Col C      Col D (to be reult is shown - need
> >> > formula)
> >> > 12345     AA          1           5
> >> > 12345     AA          1           5
> >> > 12345     AA          2           5
> >> > 98765     BA          2           2
> >> > 98765     BA          1           2
> >> > 12345     AA          5           5
> >> > 98765     BA           2          2
> >> >
> >> > Thank you.
> >>
> >> .
> >>
> .
>
 0
Utf
6/7/2010 9:50:55 PM

Similar Artilces:

Not sure if Excel can do what i need
Hello all, I am obviously a new user to excel. I have a psychological assessmen that needs to be computerised for ease of use in obtaining results. Here is what i would like to happen. I have 28 questions with fiv Likert scale options(0-4) for answers. Each question addresses 1 of different personality traits. So questions 1, 6, 8, 22 look at anger. Where as questions 2, 9, 28 look at happiness. What i would like is fo excel to group the answers and give me the total number for each trait. Then based on that number, give out a prewritten (which i would provide result of the assessment. ...

how do i add my phone number to outlook address book ?
how do i add my phone number to outlook address book ? You can't. Why would you? The Outlook Address Book is only a list of electronic addresses to which you can address messages. Why would you need a phone number there? Phone numbers, like all Contact data, are stored in your Contacts Folder. -- Russ Valentine [MVP-Outlook] "Ingaga" <Ingaga @discussions.microsoft.com> wrote in message news:2C2224F0-0E8B-4E20-A2AC-200B044053FD@microsoft.com... > how do i add my phone number to outlook address book ? What in the world is the purpse of the Outlook address book whe...

Need Min Value from Row and Heading Value that Corresponds to it.
I have a table that looks somewhat like this w/o the *'d headings: h1 h2 h3 h4 h5 h6 h7 *Min Price *Heading \$5.00 \$6.00 \$3.00 \$4.00 \$9.00 \$1.00 \$9.00 \$1.00 h6 \$3.00 \$6.00 \$8.00 \$65.00 \$9.00 \$2.00 \$4.00 \$2.00 h6 \$4.00 \$9.00 \$5.00 \$7.00 \$1.00 \$2.00 \$8.00 \$1.00 h5 \$9.00 \$7.00 \$6.00 \$3.00 \$9.00 \$8.00 \$2.00 \$2.00 h7 \$7.00 \$8.00 \$9.00 \$7.00 \$9.00 \$8.00 \$8.00 \$7.00 h1 I have several SKU's with various price contract/programs. I want to find the best price in one cell and the heading that would correspond to that cell in another. I was trying to do this with an expression ...

Excel need help
I have 2 columns a and b . a contains payment b contains balance. I have the entire col b with the formula. my ? is when the balance appearsin b it is in all the cells in that column.I only want it in the used ones, not the unused ones:( example \$270.00 16,730.00 \$270.00 16,460.00 \$100.00 16,360.00 \$300.00 16,060.00 \$270.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 this 15790.00 is in col b...not a...I want no bal in unused cells -- fiftieslady ------------------------------------------------------------------------ fiftieslady's Profile: http://www.excelforum.co...

Automatic Outline Numbering in Publish?
The automatic numbering found in Word on the menu: Formats/Bullets & Numbering - Outline Numbered does not appear to be offered in the text box in MS Publish. If this is true how does one do autimatic numbering with multi levels in a document in Publish? Respond to email in display name if possible. dwalsh@spectraenv.com <dwalsh@spectraenv.com@discussions.microsoft.com> was very recently heard to utter: > The automatic numbering found in Word on the menu: Formats/Bullets & > Numbering - Outline Numbered does not appear to be offered in the > text box in MS Publish...

Excel newbie needs help from math wiz (poker related)
I want to create a Excel workbook that will help in specific poker situations. Short version: I want to be able to calculate how often my opponent will need to fold for an all-in raise to show a positive expectation. Explanation: In poker you can win a hand by having the best hand at the end OR getting your opponent to fold. A common situation comes up where you have a "drawing hand" and face a bet by your opponent. In this situation you know you are currently behind in the hand, but have a chance to win if you catch some of your "outs" (cards that will give you th...

How can I link 2 pages without using the actual sheet as a reference? In other words, can I have two sheets linked by Identifying the same exact names one on each sheet? ...

Macro help needed........
How do I sort a particular column in ascending order and change the pag setup to landscape and margins to 0.25 using a macro code ? does anyone have a macro code for this ????? -- Message posted from http://www.ExcelForum.com Hi you have already received some answers in your previous threads please don't multipost! -- Regards Frank Kabel Frankfurt, Germany > How do I sort a particular column in ascending order and change the > page setup to landscape and margins to 0.25 using a macro code ? > > does anyone have a macro code for this ?????? > > > --- > Me...

Need to test a mobo
I had a power surge about 3 weeks ago - lost a drive, now making ticking noises. I had another two drive that seem to work sporadically now. So, I thought it might have been my power supply. Bought a tester and found out that all seems well. Next, I bought a new hard drive and found that it was also acting up - making noises like whirring up and down (like the other drives I thought were dead). So I am starting to wonder if it is my mobo - but how can I test this out? I am using a dual boot - Win XP and Win 7 - both drives work and don't work. Up and down. Right now my Win7 ...

Help needed
is there anyway you can see what links to other workbooks are associated with the workbook you have open. The problem i am having is when i open the workbook in question a message appears and states "The workbook you opened contains automatic links to information in another workbook. do you want to update this workbook with changes made to the other workbook" Yes....... No. if i click No the workbook opens, however if i click Yes the workbook just hangs and i have to go into task manager to shut down the system. I can only assume that there is a problem with one of the links....

Need help on this....thanks
I have an Excel worksheet which stored a survey outcome of over 1200 members. There are over 30 questions in the survey and the first column captured the member ID. The problem is 3 of the survey questions that allow multiple answers, instead the answer for those three questions are captured in seperate column, the answers are stored in a single column and it makes it very difficult to analysis those result. As a result I created addittional columns depending on the total number of the answers available for that question and assign the result manually to that column. It is very time consuming ...

How do you print ole objects.. Thanks lachanda -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200710/1 On Wed, 03 Oct 2007 18:13:40 GMT, "misschanda via AccessMonster.com" <u36612@uwe> wrote: >How do you print ole objects.. >Thanks >lachanda What *kind* of OLE objects? Many of them are binary blobs (such as programs) which are inherently not printable. More details please! John W. Vinson [MVP] ...

I need Help
I have a random popup that i cant stop,when it does come up it seems to know what i was looking at,like when i was looking for registry cleaner it popped up and showed me one,any help would be great. On Jan 22, 6:57=A0am, Larry <La...@discussions.microsoft.com> wrote: > I have a random popup that i cant stop,when it does come up it seems to k= now > what i was looking at,like when i was looking for registry cleaner it pop= ped > up and showed me one,any help would be great. To eliminate questions and guessing, please provide additional information about your sys...

Maximum number of worksheet tabs?
Anyone know the maximum number of worksheet tabs (don't feel like trying by trial and error)? Hi Ryan The maximum number of sheets in a workbook is limited by available memory. The max number of sheets that can, by default, be in a newly created workbook is 255 -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Ryan" <anonymous@discussions.microsoft.com> wrote in message news:F5DE29A8-1AC0-4094-AA83-9FDCF383F615@microsoft.com... > Anyone know the maximum number of worksheet tabs (don't feel like trying by trial and error)? Ryan, Thi...

Stuck in review and need to be in design.
I am using Visio 2007. I need to complete the diagram that I have been working on and I hit the review key by mistake. How do I get back to the design screen? On Wed, 4 Nov 2009 16:14:01 -0800, cameron <cameron@discussions.microsoft.com> wrote: >I am using Visio 2007. I need to complete the diagram that I have been >working on and I hit the review key by mistake. How do I get back to the >design screen? menu Tools -> Track Markup and then close the Review window. -- Regards, Paul Herber, Sandrila Ltd. DFD/SSADM for Visio http://www.visio-dfd.sa...

Need Help Despertly!
I am in a desperate situation. I had to reformat my hard drive. Prior to do this, I copied my entire User Profile to another drive. I can now access my User Profile information from Windows Explorer. Now that I installed Microsoft Outlook, I do not see any of my Contacts. I need to restore my Contacts to the new Outlook installation. Again, I did save my entire "User Profile" from my previous installation of Windows 2000 Professional. I just do not know how to access my Contact information from Outlook that included addresses and phone numbers and such. Any help would be greatly appr...

Plug in needed
Looking for an Outlook plug in which, on reply to a e-mail, will:- a) allow selective quoting only, and b) not top quote. Anything around at all? Much to my horror (sorry guys) the Boss wants us to use Outofluck at work! -- On the carpool lane lane to Nirvana. John Phillips <flatulentdingo@deadspam.com> wrote: > Looking for an Outlook plug in which, on reply to a e-mail, will:- > > a) allow selective quoting only, and > > b) not top quote. > > Anything around at all? The best Outlook adjunct I've found for quote handling on replies is Outlook-Quotef...

What is the Need for XSD in Application Blocks designing
Can anyone help in clearing my doubt Hi, There is a need for me to implement Application Blocks in my project, (Basically 3 tire), the project comprises of UIL, BLL,Business Entities, DAL.. When i saw the example programs from User Interface Application Block example, which is implementing the Business Layer part, Interface for BLL and Business Entity part where by i am not able to understand the real usage of XSD's and the autogenerated C#? Can anyone explain me what is the process flow behind this fuda in a simple terms. Thanks in Advance Jagadeesh ...

Need to Hire Outlook 2003 Help
Hi I'd like to hire someone that can walk me through some specific stuff with outlook 2003 I'm using the Lotus Notes to Outlook plugin My compnay is a Notes shop - which means I get NO support for outlook --- this plugin is a god send and i want to make sure I get it set up correctly It's coming out of my pocket but I'm willing to pay if I can find the right person to help me Please post ideas here or email me Thanks Brendan ...

I really need help. Need a formula. Need it yesterday.
I'm new to Excel formulas, and I need one that is well beyond me at this stage, but probably a piece of cake for an Excel Wizard. I have a modest staffing schedule on Excel that shows several teams of employees with staffing requirements that may change every thirty minutes, as does the number of employees available in each team. I have the spreadsheet linked to another that provides the total, overall staffing requirement for each half hour, so that the total staffing requirement for each half-hour automatically loads to my staffing schedule. Likewise with the total number of emp...

number of spaces between numbers
I am wondering if there is a formula to show how often a number is listed. ie. List 1, 2, 3, 4, 5, 2, 4, 3, 1, 1, 5, 2, 3 This would show 1: 8, 1 2: 4, 6 3: 5, 5 4: 3 5: 6 in other words show the space between when the number showed and the next time it showed. Thank you. I could even create a formula to show what row the number was found. ie. Row Number ----- --------- 100 1 101 2 102 3 103 2 104 3 105 1 Having the results show: 1: 100, 105 2: 101, 103 3: 102, 104 Any help would be appreciated. "David" wrote:...

Which setting do I need to adjust