+ Reply to Thread
Results 1 to 5 of 5

UDF IF cell color is yellow then "Hb" else Formula

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    UDF IF cell color is yellow then "Hb" else Formula

    hi,
    i am using this formula to get desired result

    Please Login or Register  to view this content.
    I Want
    if H10 = "color index = 6"
    then "HB"
    Else =IF(B10=$AC$9,AI10,IF(B10=$AD$9,AI10,AH10))


    tried a UDF but not working

    Please Login or Register  to view this content.
    .


    HOPE SOME ONE WILL HELP

    THANK YOU
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UDF IF cell color is yellow then "Hb" else Formula

    Functions can only return values, not formulas

    either embed the formula into the UDF or use the UDF to do the cell color portion only
    Last edited by humdingaling; 08-31-2017 at 03:02 AM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: UDF IF cell color is yellow then "Hb" else Formula

    OK
    Thank you for the reply

    Please Login or Register  to view this content.
    i will use above formula in this form

    =Filled(b10)

    If I Change Color Of B10 to Yellow (Interior.ColorIndex = 6)
    then
    i have a question

    will this UDF will update auto, i mean B10 = 1

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: UDF IF cell color is yellow then "Hb" else Formula

    you can just shorten it to

    Please Login or Register  to view this content.
    anyways no it will not be auto
    changing a colour of a cell will not update UDF automatically you need to refresh it manually ie press CTRL + ALt + F9 (normal F9 shouldn't work unless you put application.volatile in) or some other method to automatically update functions can be done in VBA

    like
    Please Login or Register  to view this content.
    Last edited by humdingaling; 08-31-2017 at 03:49 AM.

  5. #5
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: UDF IF cell color is yellow then "Hb" else Formula

    thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 05-04-2016, 01:01 PM
  2. [SOLVED] chage cell color to "white" if it isnt "grey"
    By baker74 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2015, 12:22 AM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  5. Replies: 12
    Last Post: 10-15-2012, 03:57 PM
  6. If File Exist from Col. G, Color Row Yellow, If "x" in Col. C, Color Row Green
    By november84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2012, 06:55 PM
  7. Replies: 2
    Last Post: 03-11-2006, 04:50 PM

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