+ Reply to Thread
Results 1 to 11 of 11

If statements / vlookup question / error message

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    17

    If statements / vlookup question / error message

    This is what I am trying to do based on the table below...

    a b c

    FALSE
    FALSE 0080
    TRUE 0080
    TRUE 0080
    TRUE 0080
    TRUE 0080
    TRUE 0080
    TRUE 0080


    The results I want to insert in column "c".

    If a is "FALSE" and b is "blank" then c = "H"
    If a is "FALSE" and b is "any value" then c = "D"
    If a is "TRUE" and b is "any value" then c = "D1"

    The table has over 500k rows. What are my options? Thanks!

    RM
    Last edited by rpmulli; 06-04-2012 at 06:34 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: If statements / vlookup question

    =IF(AND(A1=FALSE,B1=""),"H",IF(AND(A1=FALSE,B1<>""),"D",IF(A1=TRUE,"D1","")))

    and copy down?
    If I've been of help, please hit the star

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: If statements / vlookup question

    That worked perfectly! Now another issue... This data table is very large.... Everytime I sort a column and try to copy and paste it I get this message/error. Any ideas?

    error.jpg

  4. #4
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: If statements / vlookup question / error message

    If I had a dollar for every time I've seen that message I'd be a very rich man!

    Excel has its limitations and when you're dealing with such large numbers of rows and use filters, it often cannot cope with copying and pasting or dragging formulas.

    Options are to conduct your actions in chunks or get a much higher spec computer!

  5. #5
    Registered User
    Join Date
    06-04-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: If statements / vlookup question / error message

    Quote Originally Posted by Spencer101 View Post
    If I had a dollar for every time I've seen that message I'd be a very rich man!

    Excel has its limitations and when you're dealing with such large numbers of rows and use filters, it often cannot cope with copying and pasting or dragging formulas.

    Options are to conduct your actions in chunks or get a much higher spec computer!
    Haha, disregard... I read a few threads on this after I posted.

  6. #6
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: If statements / vlookup question / error message

    Well glad I could be if help on the original post

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: If statements / vlookup question / error message

    I don't think the formula provided fulfills the third scenario.

    The formula will return D1's value when A1 is TRUE but does not test for B1 having a value. Shouldn't that third condition also be in an AND()?

  8. #8
    Registered User
    Join Date
    06-04-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: If statements / vlookup question / error message

    Actually, D1 is going to be TRUE regardless if there is a value in c column

  9. #9
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: If statements / vlookup question / error message

    Nice to see pedantry isn't dead

    And on that note, scenarion3 returns the value D1 rather than the value of D1.

    Admittedly I agree with you and the formula should have another AND to say A1=TRUE and B1<>”” but the OP seemed happy enough...

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: If statements / vlookup question / error message

    OP has changed the scenario so MOOT is the word.

  11. #11
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: If statements / vlookup question / error message

    And a great word at that

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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