+ Reply to Thread
Results 1 to 6 of 6

Get the Min value and substract from a value VBA

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    Get the Min value and substract from a value VBA

    Hi All,

    I have a table in one sheet with a range of value and would like to get a MIN value for each column and substract the MIN value with all the value in that column and repeat this for all the columns to the last column.

    Any idea how to this in VBA?

    I have attached a sample sheet with before and after for clearer understanding.

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Get the Min value and substract from a value VBA

    Maybe Something like this -

    Please Login or Register  to view this content.
    Last edited by NeedForExcel; 08-01-2016 at 07:36 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    Re: Get the Min value and substract from a value VBA

    Thanks for the reply NeedForExcel

    When I run the code I get a error message of 'Overflow' on the highlited line below.

    Quote Originally Posted by NeedForExcel View Post
    Maybe Something like this -

    Please Login or Register  to view this content.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Get the Min value and substract from a value VBA

    Try this

    Please Login or Register  to view this content.
    Last edited by NeedForExcel; 08-01-2016 at 11:53 PM.

  5. #5
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    Re: Get the Min value and substract from a value VBA

    This is brilliant, Thank you very much.
    Quote Originally Posted by NeedForExcel View Post
    Try this

    Please Login or Register  to view this content.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Get the Min value and substract from a value VBA

    Glad I could help..

+ 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] Substract quantities from another sheet
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2015, 08:23 AM
  2. how to substract 2 dates in vba
    By vahe.holtian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2012, 07:01 AM
  3. substract one value from many records
    By aXpress in forum Excel General
    Replies: 3
    Last Post: 09-26-2011, 09:21 AM
  4. How to substract date.
    By manjil in forum Excel General
    Replies: 1
    Last Post: 08-25-2006, 09:23 AM
  5. How do I substract numbers in range like this: Substract(a1..a10)
    By Paulo in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-17-2005, 12:50 AM
  6. [SOLVED] how do I substract
    By kiserlouisa in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-23-2005, 08:06 PM
  7. Can you substract dates?
    By Steph in PA in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2005, 04: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