+ Reply to Thread
Results 1 to 7 of 7

IF formula to check multiple columns

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    IF formula to check multiple columns

    I have a formula currently that returns a value from a column if the source column is blank, but i need to another IF statement to the formula but it hasn't returned what i expected.

    I have attached my example and shown what the formula returns and what i want it to return (hardcoded)

    Can anyone help.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IF formula to check multiple columns

    =IF($E6="CCF",E6&"-"&D6,IF(AND(B6="(blank)",A6="(blank)"),C6,IF(A6="(blank)",B6,A6))) gives that result
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF formula to check multiple columns

    In case you have more column this will give first not blank when column E is not = to CCF
    =IF(E6="CCF","CCF-"&D6,INDEX(A6:C6,MATCH(TRUE,INDEX(A6:C6<>"(BLANK)",0),0)))

    I have assumed taht you need only one "CCF" in the return column.
    Last edited by RobertMika; 09-13-2013 at 07:03 AM.
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF formula to check multiple columns

    As i see that you start a new thread here may i asked you?

    Is this Thread solved? OR you need something else?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: IF formula to check multiple columns

    Thanks Martin, i need to add something to the formula, i need to add IF($EC6="EIF" or "FUT then use column $L6

    Where should i add this into the formula?

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: IF formula to check multiple columns

    Do you mean..

    =IF(OR($EC6="EIF",$EC6="FUT"),$L6,IF($E6="CCF",E6&"-"&D6,IF(AND(B6="(blank)",A6="(blank)"),C6,IF(A6="(blank)",B6,A6))))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: IF formula to check multiple columns

    Thanks, much appreciated

+ 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. Additional Code to check for duplicates in multiple columns
    By Craigs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2014, 04:19 AM
  2. Question re Array Formulas to Check Date Ranges from multiple columns
    By SouthpawInRelief in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-19-2013, 02:23 PM
  3. Adding Dates When Box is Check in Multiple Columns
    By svtcobrar_410 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2012, 06:00 PM
  4. Check multiple columns and return value
    By srikantsarda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2010, 02:10 PM
  5. [SOLVED] Using COUNTIF to check values in multiple columns
    By DTomSimpson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2005, 12:06 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