+ Reply to Thread
Results 1 to 6 of 6

how to have excel look at 4 columns and return the value of the colored cell

Hybrid View

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    16

    Question how to have excel look at 4 columns and return the value of the colored cell

    Hi,

    Please refer to attachement.

    I am looking for a way to look at Price 1, Price 2, Price 3 and Price 4 and return the value that is colored in Green to column named Price.

    Your suggestions are greatly apprecicated.

    Thanks
    Frederique
    Attached Files Attached Files

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: how to have excel look at 4 columns and return the value of the colored cell

    What is the logic behind the green cells? If there is logic, you can do it with a formula. Otherwise, if there is no standard logic behind which price is colored green, then you will have to use VBA to find which cell in each range has the colored fill and use that price.

    - Moo

  3. #3
    Registered User
    Join Date
    05-25-2012
    Location
    Chennai,TamilNadu,India
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    61

    Re: how to have excel look at 4 columns and return the value of the colored cell

    Hi,

    Please find attached the file with the solution. I have used macro and designed a custom function called "coloredprice" which will look into four cells and whichever is green shaded it will be returned as the output.

    Hope this helps..

    Regards,
    Hariharan
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-14-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: how to have excel look at 4 columns and return the value of the colored cell

    Hi Moo,

    There is no logic behind which price is colored green.

    Hi Hariharan,

    Thank you for the attached file.

    Are you able to explain the steps you took to create this function / Macro?
    When open the spreadsheet the answers are there however if I click in the cell it changes to #NAme?.
    I would like to have a look at the function / Macro and see if I can recreated it for the workbook that i'm working on.
    The attached Query2 was put together for examples purposes.

    Your help is greatly appreciated.

    Thanks
    Rique

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: how to have excel look at 4 columns and return the value of the colored cell

    hit alt+f11
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Registered User
    Join Date
    05-25-2012
    Location
    Chennai,TamilNadu,India
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    61

    Re: how to have excel look at 4 columns and return the value of the colored cell

    Hi,

    Sorry for the delayed response, I was in excel training session for one of my corporate client.

    Here it is,

    1. When you open the excel file which i have attached in my earlier response, you have to enable the macros else the function would not work.
    2. How to enable the macros, instruction is available in the attached word document.
    3. If you want to have a look at the function which I have developed, you need to press ALT key and F11 key together, this would take you to Visual Basic Editor screen. This is the screen which we use for writing our custom functions. In this you need to find "Module" in the project explorer, and when you double click it, it would display the coding. Process is available in the same word document.
    4. Sometimes it is possible you would directly see the code itself the moment you press ALT key and F11 key, in that case you don't have to do anything extra.

    Hope these instructions are clear for you...

    Wish you a happy weekend

    Hariharan
    Attached Files Attached Files

+ 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