+ Reply to Thread
Results 1 to 7 of 7

If function and blank returns

  1. #1
    Registered User
    Join Date
    11-01-2011
    Location
    Nottingham England
    MS-Off Ver
    Excel 2010
    Posts
    3

    If function and blank returns

    Hi
    I am trying to work out this problem with a function.

    if a cell AA2 has data in it the function should return the data the A2 has in it. If AA2 is blank the whole line should be ignored.
    If cell AA2 has data in it return the value of A2.
    If Cell AA2 has value but cell A2 is blank return a value of 999

    What I have so far,
    =IF(Results!AA2=0,"",Results!A7)

    That works but I'm really stuck on the rest.

    S

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: If function and blank returns

    So where does A7 come into it?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

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

  3. #3
    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 function and blank returns

    ΗΙ

    What I have so far,
    =IF(Results!AA2=0,"",Results!A7)
    Ι guess you mean Α2, because the description, you do not mention anywhere the cell A7

    In this case, try this code.

    Please Login or Register  to view this content.
    Regards
    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.

  4. #4
    Registered User
    Join Date
    11-01-2011
    Location
    Nottingham England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: If function and blank returns

    Quote Originally Posted by Fotis1991 View Post
    ΗΙ



    Ι guess you mean Α2, because the description, you do not mention anywhere the cell A7

    In this case, try this code.

    Please Login or Register  to view this content.
    Regards
    Hi

    Thanks for the reply
    Having done a bit more work on this I came up with
    =IF(Results!AM11<>0,IF(ISBLANK(Results!M11)=TRUE,"992",Results!M11))
    That is the actual code of course.

    It is almost there other than it returns false when a cell in AM is blank

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: If function and blank returns

    Please don't quote whole posts when replying to people.

    Dom

  6. #6
    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 function and blank returns

    Hi.

    Apart from the correct rating of Dom, once again giving us other numbers of cells(AM11 & M11).
    IF(Results!AM11<>0,IF(ISBLANK(Results!M11)=TRUE,"992",Results!M11)
    I at least get confused. I and other friends.

    Sorry.

  7. #7
    Registered User
    Join Date
    11-01-2011
    Location
    Nottingham England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: If function and blank returns

    Hi

    This function works now
    =IF(Results!AM11<>0,IF(ISBLANK(Results!M11)=TRUE,"992",Results!M11)),"")

    I hope it helps someone else.

    Sorry about the reply using full quotes [gulp]

    S

+ 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