Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jeanne
 
Posts: n/a
Default duplicate numbers in column a and diferent values in b

My file has account numbers in column A. Some may be duplicates, some may
not. In column B their are different values for each account. In column C
the duplicate numbers in A have the same value. I used conditinal formating
to identify the duplicate numbers in red. Now I need to be able to sort by
the values in A so that the duplicates are all together. Once I get them all
together, I can write and if stmt to add the two values in column B. Is
there a statement that I can use in D that would look at A and if red then
return a value of x if not return a different value? Example below the acct
number 4 I need to end up with 4 55 27. All the other rows are okay.
A B C
1 50 20
2 10 40
4 35 27
4 20 27
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith
 
Posts: n/a
Default duplicate numbers in column a and diferent values in b

There's no statement in Excel which says "if a1 is red". You need VBA for that.
However, you can accomplish the same thing with an if statement that has the
same condition as your conditional format (ie, in your case a4=a3).

You might also want to look at sumif. In column D, enter =sumif(A:A,A2,B:B) and
copy down. Then use advanced filtering to eliminate the duplicates in A.

--
Regards,
Fred


"Jeanne" wrote in message
...
My file has account numbers in column A. Some may be duplicates, some may
not. In column B their are different values for each account. In column C
the duplicate numbers in A have the same value. I used conditinal formating
to identify the duplicate numbers in red. Now I need to be able to sort by
the values in A so that the duplicates are all together. Once I get them all
together, I can write and if stmt to add the two values in column B. Is
there a statement that I can use in D that would look at A and if red then
return a value of x if not return a different value? Example below the acct
number 4 I need to end up with 4 55 27. All the other rows are okay.
A B C
1 50 20
2 10 40
4 35 27
4 20 27



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135
 
Posts: n/a
Default duplicate numbers in column a and diferent values in b


hi!

why don't you try

=SUMPRODUCT(--(A1:A4=4),--(C1:C4=27),(B1:B4))

assuming that your data in A1:C4

-via135


--
via135
------------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...o&userid=26725
View this thread: http://www.excelforum.com/showthread...hreadid=531116

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
HOW DO I ADD AMOUNTS FOR DIFERENT VALUES Paulo Coelho Excel Worksheet Functions 2 January 16th 06 12:46 AM
Sum values from diferent workbooks rquelhas Excel Worksheet Functions 0 June 25th 05 03:46 PM


All times are GMT +1. The time now is 11:12 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"