Results 1 to 10 of 11

Thread: Format Cells Based on Given Input

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi Rajesh,

    Welcome to ExcelFox !!

    It can be done through conditional formatting.

    Define ranges:

    EndDate

    Refers to: =Sheet1!$G$4:$G$8

    Holidays

    Refers to: =Sheet1!$N$4:$N$23

    SalesPersons

    Refers to: =Sheet1!$C$4:$C$8

    StartDate

    Refers to: =Sheet1!$F$4:$F$8


    Select C4:EY9 on sheet2

    In Conditional formatting

    Rule1:

    =OR(WEEKDAY(C$3,2)>5,ISNUMBER(MATCH(C$3,Holidays,0 )))

    Rule2:


    =AND(ISNUMBER(MATCH($B4,SalesPersons,0)),C$3>=INDE X(StartDate,MATCH($B4,SalesPersons,0)),C$3<=INDEX( EndDate,MATCH($B4,SalesPersons,0)),WEEKDAY(C$3,2)< 6,ISNA(MATCH(C$3,Holidays,0)))


    Format the cells accordingly.

    Note: I have define a range for Holidays.

    PFA.

    If you prefer VBA rather than CF, let me know.
    Attached Files Attached Files
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

Similar Threads

  1. Replies: 4
    Last Post: 02-22-2013, 02:24 AM
  2. Filling A Number Of Cells Based On Numerical Value
    By Ryan_Bernal in forum Excel Help
    Replies: 5
    Last Post: 02-13-2013, 09:44 PM
  3. Replies: 2
    Last Post: 01-24-2013, 09:03 PM
  4. Replies: 1
    Last Post: 12-04-2012, 08:56 AM
  5. Conditional Format Based On Percentage Variance
    By srizki in forum Excel Help
    Replies: 3
    Last Post: 10-09-2012, 03:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •