+ Reply to Thread
Results 1 to 5 of 5

IF function with a condition from reference cell

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    Zagreb
    MS-Off Ver
    Excel 2003
    Posts
    10

    IF function with a condition from reference cell

    Dear friends, I'm trying to write a formula that would filter data from one column based on condition entered in a cell.
    This one works great with single numbers or text in a reference cell:
    =IF((a2=C$3);a2;"") copied down the column

    but if I try to filter all numbers greater than 2 (I eneter ">"&2 in cell c3) it doesnt work. Please help. Is it possible with if formula or should I use something else?

    Thank you in advance

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: IF function with a condition from reference cell

    How about =If(A2>c$3,A2,"")
    Click * below if this answer helped

  3. #3
    Registered User
    Join Date
    10-15-2011
    Location
    Zagreb
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: IF function with a condition from reference cell

    Of course, but I would like to have an universal formula that can calculate >c3, <c3, =c3 depending on what I need at the moment.

    Should trick be in the cell c3, or can I create another cell with logic sign?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: IF function with a condition from reference cell

    Hi,

    Perhaps, assuming you're happy with having the operator (>, < or =) and value in separate cells; operator in C3 and value in D3:

    =IF(SIGN(A2-D$3)=SIGN(MATCH(C$3,{"<","=",">"},0)-2),A2,"")

    Regards
    Click * below if this answer helped

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

  5. #5
    Registered User
    Join Date
    10-15-2011
    Location
    Zagreb
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: IF function with a condition from reference cell

    do you maybe know the way excel can take into account reference cell that has something like >45 or >&45 written inside, perhaps with indirect function?

+ 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: 1
    Last Post: 09-18-2013, 06:10 PM
  2. [SOLVED] Cell Reference if condition match.
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2012, 11:54 AM
  3. Replies: 2
    Last Post: 12-09-2011, 10:50 AM
  4. Sumif function condition cell value
    By borut_p in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2009, 03:02 PM
  5. IF(AND)) function: condition is part of another cell's value
    By harrydavid1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-14-2008, 07:55 PM

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