+ Reply to Thread
Results 1 to 5 of 5

help with calculation formula ....

  1. #1
    Registered User
    Join Date
    07-27-2009
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    6

    help with calculation formula ....

    This following array displays the text "True" in one of the cells only if the letter "a" is entered 2 times between cell L7 to CE7...

    i would like to change into 4 times... not 2 times...

    I tried (+3,0) instead of (+1, 0) in the following formula but it works only in the first 4 cells...


    =IF(SUMPRODUCT(--(ISNUMBER(MATCH(IF($L$7:$CE$7="a",COLUMN($L$7:$CE$7)),IF($L$7:$CE$7="a",COLUMN($L$7:$CE$7))+3,0))))>0,"TRUE")

    many thanks....

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: help with calculation formula ....

    Try this:
    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-27-2009
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: help with calculation formula ....

    Hi Ron,

    thx for the reply ...

    the formula you mentioned will highlight into red.. even if there is break in between the "a"... lets say it will count the "a" from the entire rows...

    but i want the name field to appear red only if "a" is entered 4 times continuously (consequitively).... not if there there is "p" in between any of 4 "a"...

    at the moment lets say: i enter "a" is cell L7, M7, then the name field changes to red... and if I change the "a" in M7 to "p" the redness disappears... but if I enter "a" in cell the following cell the redness comes back again... so i mean it counts the "A from the cells... which is not the requirement...

    which is why the conditional formatting refers to cell CF7...(=CF7="True" (then change the colour to red....) ...



    is there is any other aleternatives i would appreciate it...

    I got the idea from this.... check it out...

    http://www.eggheadcafe.com/fileuploa...nsecutiveA.jpg

    thx...

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: help with calculation formula ....

    try this array
    =MAX(FREQUENCY(IF($L$7:$CE$7="a",COLUMN($L$7:$CE$7)),IF($L$7:$CE$7<>"a",COLUMN($L$7:$CE$7))))>=4
    returns true if 4 or more together change to = 4 if you only want to find if there are only 4 consecutive "a"'s
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    07-27-2009
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    6

    Smile Re: help with calculation formula ....

    thx martin.... that is exactly what i was looking for...

    its working now...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1