+ Reply to Thread
Results 1 to 3 of 3

Macro or Custum Function to achieve +/- 10% of a value

  1. #1
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Macro or Custum Function to achieve +/- 10% of a value

    Dear All,
    I am using Excel 2010.
    Please see the attached file for the problem.

    I have made steps to indicate my problem and colored them for ease of understanding.

    Step 1 – Check Values in Col F. If negative then eg F16 (which was negative and replaced)
    Step 2 – Check the value in the corresponding Row in Col H eg H16
    Step 3 – Look up and down for 4 values within +/- 10% of the value in Cell H16
    Step 4 – Look up corresponding value against the values within 10% (do not include negative values)
    Step 5 – Add all the values in Col F excluding the negative and divide it by 8 – Result is 1.843 in Cell F16

    A macro or a Custom Function to achieve my requirement would be highly appreciated.
    Thanks in advance.
    Rashid
    Attached Files Attached Files

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macro or Custum Function to achieve +/- 10% of a value

    I don't understand the first step. Find the negative values in column F and replace them with what?

    In your attachment, why was it acting on F16 and not on F12?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Macro or Custum Function to achieve +/- 10% of a value

    Hi
    Thanks for your reply.
    The value in F16 was also negative which was bigger than the value in F12.
    We always go with the highest negative value.
    The value shown in my sample data is already replaced manually (See the Formula bar)
    Hope it is clear now

  4. #4
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Macro or Custum Function to achieve +/- 10% of a value

    Any help on my problem please?
    Regards

+ 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 use a macro (or other approach) to achieve this simple task?
    By zjianguk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2012, 10:52 AM
  2. [SOLVED] function to achieve following in excel 2007
    By rajxabc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-21-2012, 10:58 PM
  3. Custum subtotal formula for autofiltered data
    By 1eyedjack in forum Excel General
    Replies: 2
    Last Post: 02-08-2012, 11:14 AM
  4. [SOLVED] [SOLVED] Add standard button on custum commandbar
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2005, 08:05 PM
  5. [SOLVED] Help with using custum functions
    By Patrick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2005, 01:06 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