+ Reply to Thread
Results 1 to 6 of 6

Nested function or VBA to create heat map of prices

  1. #1
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Exclamation Nested function or VBA to create heat map of prices

    Good morning
    I want to create a heat map to determine if national prices are underated or overated relative to average worldprice. I don't know if this thread can be solved by VBA or just with Excel nested functions.

    Here you can find what i want as final result:

    Picture1.png


    Here you can find my expectations:
    - If the difference between antenna spain national price and antenna average world price is positive and the absolute value of the difference between antenna spain national price and antenna average world price is over 120% of the antenna average world price, so put the cell in red

    - If the difference between antenna spain national price and antenna average world price is positive and the absolute value of the difference between antenna spain national price and antenna average world price is between 100% and 120% of the antenna average world price, so put the cell in orange

    - If the difference between antenna spain national price and antenna average world price is negative and the absolute value of the difference between antenna spain national price and antenna average world price is between 100% and 120% of the antenna average world price, so put the cell in light green

    - If the difference between antenna spain national price and antenna average world price is negative and the absolute value of the difference between antenna spain national price and antenna average world price is over 120% of the antenna average world price, so put the cell in dark green

    Thank you for your help.
    Attached Files Attached Files
    Last edited by Luu4466; 11-11-2020 at 09:17 AM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Nested function or VBA to create heat map of prices

    Hello and Welcome to Excel Forum.
    I tried to use the descriptions to write the rules as the formatting in the sample doesn't match the rules in some places (please see attached file).
    For red: =OR(AND(ISNUMBER(SEARCH("no",$M5)),N5>N$16*1.2),AND(ISERROR(SEARCH("no",$M5)),N5>N$17*1.2))
    For orange: =OR(AND(ISNUMBER(SEARCH("no",$M5)),N5>=N$16,N5<=N$16*1.2),AND(ISERROR(SEARCH("no",$M5)),N5>=N$17,N5<=N$17*1.2))
    For light green: =OR(AND(ISNUMBER(SEARCH("no",$M5)),N5<N$16,N5>=N$16*0.8),AND(ISERROR(SEARCH("no",$M5)),N5<N$17,N5>=N$17*0.8))
    For dark green: =OR(AND(ISNUMBER(SEARCH("no",$M5)),N5<N$16*0.8,N5<>""),AND(ISERROR(SEARCH("no",$M5)),N5<N$17*0.8,N5<>""))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: Nested function or VBA to create heat map of prices

    THank you for your reply. I try this today.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Nested function or VBA to create heat map of prices

    You're Welcome and thank you for the feedback. If the solution proves to be correct then please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

  5. #5
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: Nested function or VBA to create heat map of prices

    Where do you put this formula? In which area?

  6. #6
    Forum Contributor
    Join Date
    11-07-2020
    Location
    Paris
    MS-Off Ver
    Microsoft office 365
    Posts
    175

    Re: Nested function or VBA to create heat map of prices

    Ah ok you put formula in conditionnal formating rules manager. Thank you a lot. You solved my problem.
    Attachment 703647

+ 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. [SOLVED] how to create nested if function for military time
    By km117 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-19-2022, 04:31 AM
  2. create a dropdown list for prices
    By cybershot in forum Excel General
    Replies: 1
    Last Post: 04-06-2019, 11:18 PM
  3. Replies: 2
    Last Post: 01-05-2019, 03:33 AM
  4. Nested average with negative prices and different amount of numbers
    By danwoltrs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2017, 08:19 AM
  5. Create a Bubble heat map to show opportunity size
    By Dubai2017 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-18-2017, 04:06 PM
  6. [SOLVED] Nested SUMIF function to create a transcript
    By wildenbeast in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-28-2016, 05:50 PM
  7. Create custom function to exceed 7 nested If functions in Excel 2003/XP/2000/97
    By seanyeap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2008, 08:54 AM

Tags for this Thread

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