Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

“If” formula for the letter the value begins with?

Latest post Wed, Oct 20 2010 4:02 PM by Bob Phillips. 2 replies.
  • Wed, Oct 20 2010 1:33 PM

    “If” formula for the letter the value begins with?

    I have 3 sheets in my excel document.  The first one is the main form and the other 2 are summaries that need to be populated and distributed the correct person depending if one value on  Sheet1 begins with a letter between A-O or P-Z. 

    What I need on each summary sheet is this sequence:

    On Sheet 2 in Cell A5 I need: If the Payable cell (Sheet1 A10:B10) begins with A-O, Populate this field with the payable cell (Sheet1 A10:B10).

    Sheet2 Cell B5: If A5 is populated, this cell is equal to ='Sheet1'!C9:D10

    On Sheet 3 in Cell A5 I need: If the Payable cell (Sheet1 A10:B10) begins with P-Z, Populate this field with the payable cell (Sheet1 A10:B10).

    Sheet3 Cell B5: If A5 is populated, this cell is equal to ='Sheet1'!C9:D10

    Thanks for all your help!!

    • Post Points: 21
  • Wed, Oct 20 2010 3:26 PM In reply to

    • Omar
    • Top 10 Contributor
    • Joined on Sat, Jan 12 2008
    • Kitchener, ON
    • Posts 128
    • Points 1,823

    Re: “If” formula for the letter the value begins with?

    Try this for starters in sheet2!a5:

    =if(and(left(sheet1!a10,1)>="a",left(sheet1!a10,1)<="o"),sheet1!a10,"")

     

    Omar Freeman Kitchener, ON

    • Post Points: 21
  • Wed, Oct 20 2010 4:02 PM In reply to

    Re: “If” formula for the letter the value begins with?

    I think you need to ensure upper-case values

    =IF(AND(CODE(LEFT(Sheet1!A10,1))>=CODE("A"),CODE(LEFT(Sheet1!A10,1))<=CODE("O")),Sheet1!A10,"")

    Regards

    Bob

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.