Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Remove Duplicates (Macro)

John,

In the case of SUMPRODUCT, the arguments are arrays. So even though COUNTIF only looks at one condition at a time, SUMPRODUCT will go through each cell in the array. You could think about it as though the formula was written as an array formula this way:

{=SUM(1/COUNTIF(A1:A4, A1:A4))}

Excel would look at the array above and translate it as:

1/COUNTIF(A1:A4, A1) +
1/COUNTIF(A1:A4, A2) +
1/COUNTIF(A1:A4, A3) +
1/COUNTIF(A1:A4, A4)

It might be easiest to see how the function works by using the "Evaluate Formula" button on the Formulas tab to step through the calculations one at a time.

Ben
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
remove duplicates asol Excel Programming 1 May 5th 10 10:24 PM
How to remove row duplicates SNAP TO GUIDES DON''T SNAP Excel Discussion (Misc queries) 1 September 10th 08 10:28 PM
remove duplicates macro ending sub Susan Excel Programming 8 September 22nd 06 12:58 PM
remove duplicates jeff quigley Excel Programming 1 June 9th 05 03:13 PM


All times are GMT +1. The time now is 02:12 AM.

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

About Us

"It's about Microsoft Excel"