+ Reply to Thread
Results 1 to 6 of 6

minus value with specific condition through VBA code

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    india
    MS-Off Ver
    excel 2010
    Posts
    427

    minus value with specific condition through VBA code

    please see in to attached file there is in A column some values if values of A column greater than 10 but less than 25 then minus 5 from that value
    if values of A column greater than 25 but less than 100 then minus 10 from that value my expected result is in B column that is you can see
    i do that manualy but how do that through VBA code
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Re: minus value with specific condition through VBA code


    Do you need to change column A or just have the result in column B ?

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: minus value with specific condition through VBA code

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: minus value with specific condition through VBA code


    As for the result in column B it can be directly achieved without any loop just with 3 codelines …

  5. #5
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: minus value with specific condition through VBA code

    Possibly...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-13-2013
    Location
    india
    MS-Off Ver
    excel 2010
    Posts
    427

    Re: minus value with specific condition through VBA code

    thanks now my problem is solved

+ 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 plus minus by specific condition
    By keshavtale in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-24-2018, 12:43 AM
  2. [SOLVED] VBA code, cut and paste entire row into new sheet per specific condition in cell
    By Tapyr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-07-2015, 08:53 AM
  3. vba code to insert blank row after specific condition is met
    By archies.gall in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2014, 05:07 AM
  4. Run VBA code with a specific condition
    By missy22 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2012, 12:35 PM
  5. Formula: Finding todays date minus min value from certain range + extra condition
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2011, 10:21 AM
  6. counting one condition but minus another
    By SNUBBLE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-11-2007, 07:19 AM
  7. How to check for Plus/Minus condition (Macro)
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-26-2007, 03:58 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