Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
yo eddy
 
Posts: n/a
Default IF formula with MAX function


I'm trying to clean up some data that is rather dirty and could use some
help here. What I would like to do is deduplicate data but with certain
criteria. I have duplicate company names and each company has a value.
For all the same companies I'd like to just select or mark the entry
with the maximum number of users.

Her is a same of the data

COMPANY NAME USERS
Company A 1
Company A 7
Company A 3
Company B 15
Company B 86
Company B 2
Company B 2
Company B 51
Company C 3
Company C 5
Company C 11

COMPANY NAME is column a and USER values is in column b. I'd like to
return the MAX USER values in column c

I would like the output to look like:
COMPANY NAME MAX USERS
Company A 7
Company B 86
Company C 11

I've tried to combine the IF formula and MAX but I need to somehow
create a scenario where the MAX function is executed only on the array
of formulas for the similar company names. Maybe hold it in an array -
which I don't know how to do.Maybe VB or VBA could solve this?

Here is the formula in theory:
=if(and(a3=a4), MAX: **-the range of values for each similar company
would go here** -, max value, delete))

ANy suggestions would greatly be appreciated.

Eddy


--
yo eddy
------------------------------------------------------------------------
yo eddy's Profile: http://www.excelforum.com/member.php...o&userid=35243
View this thread: http://www.excelforum.com/showthread...hreadid=550170

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default IF formula with MAX function

I put this in C2 (headers in row 1):

=IF(COUNTIF($A$2:$A2,A2)1,"",MAX(IF($A$2:$A$999=A 2,$B$2:$B$999)))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

And drag it down the column.



yo eddy wrote:

I'm trying to clean up some data that is rather dirty and could use some
help here. What I would like to do is deduplicate data but with certain
criteria. I have duplicate company names and each company has a value.
For all the same companies I'd like to just select or mark the entry
with the maximum number of users.

Her is a same of the data

COMPANY NAME USERS
Company A 1
Company A 7
Company A 3
Company B 15
Company B 86
Company B 2
Company B 2
Company B 51
Company C 3
Company C 5
Company C 11

COMPANY NAME is column a and USER values is in column b. I'd like to
return the MAX USER values in column c

I would like the output to look like:
COMPANY NAME MAX USERS
Company A 7
Company B 86
Company C 11

I've tried to combine the IF formula and MAX but I need to somehow
create a scenario where the MAX function is executed only on the array
of formulas for the similar company names. Maybe hold it in an array -
which I don't know how to do.Maybe VB or VBA could solve this?

Here is the formula in theory:
=if(and(a3=a4), MAX: **-the range of values for each similar company
would go here** -, max value, delete))

ANy suggestions would greatly be appreciated.

Eddy

--
yo eddy
------------------------------------------------------------------------
yo eddy's Profile: http://www.excelforum.com/member.php...o&userid=35243
View this thread: http://www.excelforum.com/showthread...hreadid=550170


--

Dave Peterson
Reply
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
Last Saved Date Formula / Function [email protected] Excel Discussion (Misc queries) 3 June 7th 06 04:52 PM
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Price function difference in Output formula vis a vis Manual Calculation abhi_23 Excel Worksheet Functions 0 January 17th 06 07:57 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM


All times are GMT +1. The time now is 01:41 AM.

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

About Us

"It's about Microsoft Excel"