+ Reply to Thread
Results 1 to 4 of 4

How to create an IF formula that will determine if a cell begins with a certain character

  1. #1
    Registered User
    Join Date
    01-27-2017
    Location
    Hemyock
    MS-Off Ver
    365
    Posts
    2

    How to create an IF formula that will determine if a cell begins with a certain character

    Screen Shot 2017-01-27 at 11.32.42.png

    I know this is probably a basic question so bear with me.... I'm in the process of creating my first ever dashboard so may be on here a lot!

    I need to create an IF formula that will ascertain if the contents of a cell begin with / and if not then multiply by a value that I will have to input manually for each line (there's only 66,000 rows in my sheet )

    So in cell I2 I need a formula that gives, if A2 begins with / then give me the value in G2, if not then multiply by value.

    My client is a manufacturer of pies and pasties - their products are sold in boxes normally. The dashboard I'm creating needs to have a value for number of individual products, not number of boxes. Their individual product codes are prefixed with / and their boxes are not hence the question.

    I hope you guys can help me
    Thanks
    Clare

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: How to create an IF formula that will determine if a cell begins with a certain charac

    You can use something like this:

    =IF(LEFT(A2)="/",G2, ... )

    but your requirements are vague for what you want to achieve if A2 does not begin with "/".

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: How to create an IF formula that will determine if a cell begins with a certain charac

    Clare,

    If you want a "standard" manual value for cells not beginning with the oblique, put that value in X2, then put this in I2 and copy it down.

    =IF(LEFT(TRIM(A2),1)="/",G2,$X$2)

    If you want a different manual value for each row for cells not beginning with the oblique, put the value in Col X, then put this in I2 and copy it down.

    =IF(LEFT(TRIM(A2),1)="/",G2,X2)

    Hope this solves it for you

    Ochimus

  4. #4
    Registered User
    Join Date
    01-27-2017
    Location
    Hemyock
    MS-Off Ver
    365
    Posts
    2

    Re: How to create an IF formula that will determine if a cell begins with a certain charac

    Thank you guys

    For the values not beginning with / I need G2 to be multiplied by a value returned by a VLOOKUP to another table (the quantity of pies in a box) but that part is easy and the table is already created. It was just recognising column A values starting with / that I couldn't fathom.

    Sorted now - thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 02-20-2015, 09:40 AM
  2. How to Create Formula to Add 1 to Cell if other Cell Contains Specific Character?
    By jamesjunkers in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2014, 04:54 PM
  3. [SOLVED] copy rows where column data begins with an alpha character
    By shaz0503 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-22-2013, 10:05 PM
  4. Determine if a character is within a cell. Specifically an ampersand.
    By traveler3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2013, 12:24 AM
  5. [SOLVED] if cell BEGINS WITH abc, then return 123, or if cell BEGINS WITH def, then 456, ...
    By Marijke in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-29-2013, 11:20 AM
  6. [SOLVED] How to copy all character till first space which begins with "RXO" data
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-06-2013, 07:35 AM
  7. Excel formula/VBA for IF cell A= 'xx' but cell B begins with 'yyyy'
    By whizzergo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 08:48 AM

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