+ Reply to Thread
Results 1 to 4 of 4

IF Formula with Conditional Formatting

  1. #1
    Registered User
    Join Date
    05-21-2007
    Posts
    57

    Question IF Formula with Conditional Formatting

    I want to implement 2 things at the same time (plz see attached simple table):

    1- (Validation list with conditional formatting): Greyout one line item ($) if (Own) is seleceted & vise versa. For example: if (D2=Own), then Land price (rent), & Construction Cost (rent) are greyed out

    2- Retreive data/$ from other tab. The question is (how to pull $ into the (unshaded) cell (Land own & cons. Own) & not the greyed out cells & vise versa
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,577

    Re: IF Formula W/Cond. Formatting?

    I assume your actual workbook is a little more complex as far as the data being pulled. I used a VLOOKUP.

    To turn the cells gray, use Conditional Formatting >Formula
    e.g =$D$2="own"
    I turned both the background and the font gray.
    See attachment. Does that help?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    05-21-2007
    Posts
    57

    Re: IF Formula W/Cond. Formatting?

    It helps 50%.

    The problem is that (Data Source) tab is a template, & i can't make edit to it (like you did by showing a field price for "own", & one for "rent").
    The trick is how to capture the only one $ from (data source) tab, & allocate it to the right field (per "owned" or 'rent").

    Make sense?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,577

    Re: IF Formula W/Cond. Formatting?

    Is it always going to be in the same two cells? If so, then
    In C5 to C8
    =IF($D$2= "own", 'Data Source'!$D$5,"")
    =IF($D$2= "rent", 'Data Source'!$D$5,"")
    =IF($D$2= "own", 'Data Source'!$D$6,"")
    =IF($D$2= "rent", 'Data Source'!$D$6,"")
    ?

+ 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