#1   Report Post  
Paula
 
Posts: n/a
Default Decipher Formula

Would someone please decipher this formula for me in
layman's term?

=SUMPRODUCT(LEN(J3:P57)-LEN(SUBSTITUTE
(J3:P57,"Discard","")))/LEN("Discard")

Thank you
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
The SUMPRODUCT part:
SUMPRODUCT(LEN(J3:P57)-LEN(SUBSTITUTE(J3:P57,"Discard","")))

calculates for each cell in the range J3:P57 the difference between the
original string
LEN(J3:P57)
and the string which results if you substitute 'Discard' in these
strings with nothing ""
LEN(SUBSTITUTE(J3:P57,"Discard",""))

These results are then summed. So lets consider you have the following
three strings:
J3: This is a normal string
J4: With Discard
J5: Discard and another Discard

The SUMPRODUCT formula would return the following for these three
cells:
J3: LEN("This is a normal string")-LEN("This is a normal string") = 0
J4: LEN("With Discard")-LEN("With ") = 7
J5: LEN("Discard and another Discard")-LEN(" and another ") = 14

Then it sumes the results and in our example you'll get 21
This is then divided by the length of 'discard' = 7 and the final
result would be 3

So in total this formula counts the number of occurences of the string
'Discard' within the specified range

--
Regards
Frank Kabel
Frankfurt, Germany

"Paula" schrieb im Newsbeitrag
...
Would someone please decipher this formula for me in
layman's term?

=SUMPRODUCT(LEN(J3:P57)-LEN(SUBSTITUTE
(J3:P57,"Discard","")))/LEN("Discard")

Thank you


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
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
Simple formula doesn't quite add up circeo Excel Discussion (Misc queries) 3 January 17th 05 09:04 PM
how do I make a formula NOT change when the data range is moved? Alida Andrews Excel Discussion (Misc queries) 2 January 6th 05 09:02 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


All times are GMT +1. The time now is 09:13 PM.

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"