+ Reply to Thread
Results 1 to 5 of 5

Correct syntax for a formula

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2007
    Posts
    25

    Correct syntax for a formula

    Hi there,

    I need the correct syntax for a formula that will give me a 'True' from one of 5 'what if' conditions.

    Okay. In sheet1 we have an index number in A1, let's give it ABC0001. In B1 we have a drop down list presenting 5 options; 'open', 'closed', 'on-hold', 'closed - awaiting adjustment', and 'awaiting response'.

    On sheet2, I want the result of the argument (if true) to appear at A1. The result of the argument will be whatever is on sheet1 at A1, which in this case is the index number ABC0001. No matter which of the 5 conditions appears on sheet1 at b1, the result appearing on sheet2 at A1 will always be whatever is in A1 on sheet 1.

    I have the first bit working...that is to say, the appearance of one condition only...thus: =IF('sheet1'!B2<>"OPEN",'sheet1'!A2,""). Of course, I need the other 4 arguments included in the formula. Ultimately, whichever condition from the dropdown box appears at sheet1 in B1. The result will be whatever index number appears on sheet1 at A1, will appear on sheet2 at A1. If no condition has been chosen, and sheet1 B1 is blank, then A1 on sheet2 will also be blank.

    I need to 'nest' the other conditions of the dropdown box in the same formula, but to give only one and the same result.

    Can any kind person help me?

    Kindest regards to all

    Aristillus

  2. #2
    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
    44,364

    Re: Correct syntax for a formula

    You could try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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


  3. #3
    Registered User
    Join Date
    11-20-2018
    Location
    Scotland
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Correct syntax for a formula

    Hi Aristillus,
    Your explanation uses A1 and B1 but the formula you show uses A2 and B2.
    keeping with your example formula and correcting TMS (sorry TMS)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Change the A2 B2 to A1 B1 if that is what you need.

  4. #4
    Registered User
    Join Date
    02-20-2013
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Correct syntax for a formula

    Thank you for the replies guys.

    TMS, your formula works rather well, and does what I require. Many thanks for the truncated and more elegant formula. I don't know why I was thinking I needed to nest the conditions.

    Caveman1957,

    I should have made it more clear that the formula was going into Sheet2 A1. Thanks for the help.

    Regards all

    Aristillus

  5. #5
    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
    44,364

    Re: Correct syntax for a formula

    You're welcome. Thanks for the rep.


    Easy to overthink it



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] Correct Formula Syntax Required...
    By Aristillus in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-17-2017, 07:55 PM
  2. [SOLVED] Correct syntax for referencing a separate worksheet in a formula when.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2014, 03:01 PM
  3. Correct syntax to add a workbook name that is stored in a variable into a formula
    By lordterrin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2014, 03:46 PM
  4. [SOLVED] Correct syntax for formula for data in different columns
    By sam503 in forum Excel General
    Replies: 3
    Last Post: 02-21-2014, 03:21 PM
  5. correct syntax for if formula
    By tryer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-16-2011, 11:29 AM
  6. Replies: 2
    Last Post: 05-11-2010, 11:58 PM
  7. Correct VBA syntax for cell function formula
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2005, 01:05 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