+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting and Errors

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Conditional Formatting and Errors

    Hello all,

    I made a calendar that collects data from another tabsheet by looking at the month and daynumber. When there is no occurrence it displays a #N/A.

    I thought about using =IF(ISERROR(OriginalFormula),"",OriginalFormula) to hide the errors but the formula is too cumbersome for that.

    Another possibility would be using conditional formatting =ISNA(A1), but, not all cells have the same color, which makes it quite difficult to apply.

    Another conditional formatting is in use for displaying weekends by looking at the year.

    The attachment will show what I mean

    Any ideas?
    Attached Files Attached Files

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Conditional Formatting and Errors

    Try this formula in C5
    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",RIGHT(INDEX(SHEET1!$K$3:$IV$253,MATCH($B$2,SHEET1!$B$3:$B$253,0),MATCH(DATEVALUE(C$4&"/"&$B5&"/"&$B$4),SHEET1!$K$1:$IV$1,0)),IF(LEN(INDEX(SHEET1!$K$3:$IV$253,MATCH($B$2,SHEET1!$B$3:$B$253,0),MATCH(DATEVALUE(C$4&"/"&$B5&"/"&$B$4),SHEET1!$K$1:$IV$1,0)))=3,2,1))))

    copied down then accross
    Attached Files Attached Files
    Last edited by contaminated; 05-29-2010 at 04:30 AM. Reason: Attaching WB
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional Formatting and Errors

    FWIW it seems there's an issue with how you intend to handle the numerics eg 24th May.

    Using your present set-up (which ignores numerics) you could shorten to:

    =LOOKUP(REPT("Z",255),CHOOSE({1,2},"",REPLACE(INDEX(SHEET1!$K$3:$IV$253,MATCH($B$2,SHEET1!$B$3:$B$253,0),MATCH(DATE($B$4,MONTH(1&$B5),C$4),SHEET1!$K$1:$IV$1,0)),1,1,"")))

  4. #4
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Re: Conditional Formatting and Errors

    Quote Originally Posted by DonkeyOte View Post
    FWIW it seems there's an issue with how you intend to handle the numerics eg 24th May.

    Using your present set-up (which ignores numerics) you could shorten to:

    =LOOKUP(REPT("Z",255),CHOOSE({1,2},"",REPLACE(INDEX(SHEET1!$K$3:$IV$253,MATCH($B$2,SHEET1!$B$3:$B$253,0),MATCH(DATE($B$4,MONTH(1&$B5),C$4),SHEET1!$K$1:$IV$1,0)),1,1,"")))
    Hello DonkeyOte,

    This works almost... It does not show the "Z", "C" or the "V" however
    Too be honest, I find your formula quit difficult too solve this myself.

    BTW, If this shortens the formula I rather use the numbers in row A for the months iso collumn B

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional Formatting and Errors

    Did you try Contaminated's - I think that will work for you, no ?
    (you might need to change the date separator pending locale settings... also note the superfluous spaces in the formula - inserted by the board software unfortunately)

    edit: if you use the month numbers you can use DATE rather than DATEVALUE
    Last edited by DonkeyOte; 05-29-2010 at 05:11 AM.

  6. #6
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Re: Conditional Formatting and Errors

    Contaminated, your formula works fine indeed.
    Something must have gone wrong the first time I looked at it.
    Thanks again

    One question though, what does the LOOKUP(REPT("z";255 do?

+ 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