+ Reply to Thread
Results 1 to 4 of 4

Adding IF AND criteria to existing IF Statement

  1. #1
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    Adding IF AND criteria to existing IF Statement

    I have an IF statement that as is it works perfectly. However I have the need to change the criteria which would require the addition of (I believe) of an AND OR statement). A copy of the formula is below (row 477 happens to be a specific example of this new criteria). This formula resides in column B.

    Please Login or Register  to view this content.
    C477 = Have Column Yes or -
    E477 = Gauge (this is the new variable that the concatenation requires)

    I would like the same concatenation however if the value in this cell is equal to or greater than 20, than "awg" is the text
    if the value is less than 20, the (current) concatenation statement displaying "swg" would be correct
    F477 = size, this is a fraction, the concatenation statement accounts for this format
    G477 = this is an item name
    P477 = this is an item name

    I have attached a file example so you can see what I am saying. I have hidden all non-relevant rows and columns to make this easier. Row 476 shows 19 gauge, so if the formula works properly, in column B it should reflect 19swg 3/32 (as it does currently). Row 477 is 20 gauge, so once the formula works properly, this should display as 20awg 3/32. Thanks in advance for all your time and help. I have spent the last 2 hours, and 3 cups of coffee on trying to resolve this without success.
    Attached Files Attached Files
    ~*~ Sherry ~*~
    Poinciana, FL

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,180

    Re: Adding IF AND criteria to existing IF Statement

    Try

    =IF(OR(G477="",C477="-"),"-",IF(ISTEXT(F477),F477,IF(P477="Rings",CONCATENATE(E477,IF(E477>=20,"awg","swg "),TEXT(F477,"##/###")),F477)))

  3. #3
    Forum Contributor Webbers's Avatar
    Join Date
    09-06-2005
    Location
    Poinciana, FL
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    337

    Re: Adding IF AND criteria to existing IF Statement

    Quote Originally Posted by JohnTopley View Post
    Try

    =IF(OR(G477="",C477="-"),"-",IF(ISTEXT(F477),F477,IF(P477="Rings",CONCATENATE(E477,IF(E477>=20,"awg","swg "),TEXT(F477,"##/###")),F477)))
    Perfect JohnTropley! Thank you so much! I knew I was trying to over complicate it and I was!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,180

    Re: Adding IF AND criteria to existing IF Statement

    Thank you for the feedback and rep.

+ 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: 3
    Last Post: 01-13-2016, 12:05 PM
  2. [SOLVED] adding text in front of potentially existing text (in 1 cell) with IF/THEN statement
    By Marijke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2014, 04:20 AM
  3. [SOLVED] Adding additional selection criteria to existing Macro
    By Mogpot1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 10:29 AM
  4. Adding AND to an existing IF statement
    By Jaspal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2013, 07:28 AM
  5. [SOLVED] Automatically Adding a IF Statement To A Column Of Existing Formula's
    By GEANZ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-12-2013, 12:50 AM
  6. Replies: 4
    Last Post: 01-27-2012, 10:57 PM
  7. Adding nested if statement to existing script
    By adammark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-29-2010, 12:31 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