+ Reply to Thread
Results 1 to 16 of 16

How do i make this formula not case sensitive?

  1. #1
    Registered User
    Join Date
    07-08-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2011
    Posts
    10

    How do i make this formula not case sensitive?

    so im using this formula to return a value based on the letter U in a cell:

    =SUM(LEN(BO5:BO14)-LEN(SUBSTITUTE(BO5:BO14;"U";"")))

    but how do i make it not case sensitive, as it stands now, it only registers capitals, and its the other way around, if i make the u small in the formula, can you come around this?

    thanks
    Last edited by Zargon; 07-15-2012 at 05:21 PM.

  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: How do i make this formula not case sensitive?

    If you use this variation, you won't need to use CTRL+SHIFT+ENTER to make it an array formula.
    Regular formula:
    =SUMPRODUCT(LEN(BO5:BO14)-LEN(SUBSTITUTE(UPPER(BO5:BO14),"U","")))

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How do i make this formula not case sensitive?

    HI Ron,

    Forgive my ignorance, but I have read that SumProduct is volatile (others have said its not). Therefore is there a difference between SumProduct and Array formulas since both are volatile.

    Thanks in advance for your insight.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

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

    Re: How do i make this formula not case sensitive?

    SUMPRODUCT is not volatile.

    See Charles Williams' site:
    http://www.decisionmodels.com/calcsecretsi.htm

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How do i make this formula not case sensitive?

    Hi Ron,

    Thanks for the confirmation. Half the posts I read that Sumproduct is volatile and the other half say its not. Sometimes I'm not sure who to believe. I tend to stay away from it anyways because I rarely work on Excel 03 or before so it's not a big issue for me, but I know this comes up alot when people don't have the newer versions of Office available to them.

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

    Re: How do i make this formula not case sensitive?

    Quote Originally Posted by abousetta View Post
    Hi Ron,

    I tend to stay away from it anyways....

    WHY??? In my Excel classes I spend 30 minutes covering "SUMPRODUCT, Excel's most versatile function"!

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How do i make this formula not case sensitive?

    I guess I never got the hang of it, but also because of suggestions like this from MSDN (http://msdn.microsoft.com/en-us/library/ff726673.aspx):

    "Starting in Excel 2007, you should always use the SUMIFS, COUNTIFS, and AVERAGEIFS functions instead of SUMPRODUCT formulas where possible."

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

    Re: How do i make this formula not case sensitive?

    That's different from "I tend to stay away from it".

    In those circumstances where the SUMIFS, COUNTIFS, and AVERAGEIFS functions apply, absolutely use them.
    SUMPRODUCT nicely covers almost all of the other instances where, for one reason or another, those don't work.
    Last edited by Ron Coderre; 07-09-2012 at 09:35 AM. Reason: corrected a stupid grammatical error...argh!

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How do i make this formula not case sensitive?

    Hi Ron,

    Agree. When I stated "I tend to stay away from it", I didn't mean to imply that the reason was because of an inherent issue with SumProduct but rather that I have not really found a need for it because other functions available since 2007 sufficed my needs. I see some people use instead of sumifs, etc. even with Excel 2010 because it is backwards compatible with 03 and earlier versions of Excel, which is not a priority for my needs.

  10. #10
    Registered User
    Join Date
    07-08-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: How do i make this formula not case sensitive?

    Quote Originally Posted by Ron Coderre View Post
    If you use this variation, you won't need to use CTRL+SHIFT+ENTER to make it an array formula.
    Regular formula:
    =SUMPRODUCT(LEN(BO5:BO14)-LEN(SUBSTITUTE(UPPER(BO5:BO14),"U","")))

    Is that something you can work with?


    Yes and no.
    Yes, cause thanks for an actual solution.
    No cause if i wanted to use it, i'd had to change way to much to make it worth it, it'd be easier to just change the lettering to capitals in the reports.
    can't i modify the original formula?

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

    Re: How do i make this formula not case sensitive?

    I DID modify your original formula...
    I used the UPPER function to force the text to be uppercase and I replaced SUM with SUMPRODUCT (eliminating the need to CSE the formula).

    Perhaps you could do this...
    • Find/Replace all: = and replace with: |=....that will convert all formulas to text
    • Find/Replace all: SUBSTITUTE( and replace with: SUBSTITUTE(UPPER(
    • Find/Replace all: ;"U" and replace with: );"U"
    • Find/Replace all: |=SUM and replace with: =SUMPRODUCT

    That would convert all of your formulas to the new version.

    Is that something you can work with?

  12. #12
    Registered User
    Join Date
    07-08-2012
    Location
    Sweden
    MS-Off Ver
    Excel 2011
    Posts
    10

    Re: How do i make this formula not case sensitive?

    That's brilliant, i can use that.

    Was a bit trickier to implement due to alot of other formulas getting messed up because of the " Find/Replace all: |=SUM and replace with: =SUMPRODUCT"

    But its working now, thanks alot!

  13. #13
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,234

    Re: How do i make this formula not case sensitive?

    Hi Ron,

    You made me research the SumProduct Volatile or NOT question. See http://spreadsheet-toolbox.com/libra...in-excel-2007/ which implies it might be in some versions and/or with a uniary operator in it.

    I have no way of checking for sure. I'll keep learning...
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,082

    Re: How do i make this formula not case sensitive?

    @MarvinP: I'm pretty sure that, if you have a volatile function in your workbook, you'd get the "do you want to save the changes you made ..." message if you simply open the workbook, do nothing to it and then close it again.

    An easy test is with INDIRECT: if you put "C1", no quotes, in cell A1, =INDIRECT(A1) in cell B1, and 5 (or whatever) in cell C1, the formula will return 5 (or whatever you put in it) in cell B1.

    Now, if you save and close this new workbook with nothing except those three cells, open it again ... do nothing, make no changes ... and close it again, you'll get the message above. So, that's volatile for you.

    Try it again with (any) SumProduct ... no message ... not volatile.

    Tested in 2003 and 2007.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  15. #15
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,234

    Re: How do i make this formula not case sensitive?

    Great answer and clear, to me at least.

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,082

    Re: How do i make this formula not case sensitive?

    @MarvinP: you're welcome.

    @icestationzbra: thanks for the rep. Yep, always confused me. Easy one to spot is =TODAY()

+ 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