+ Reply to Thread
Results 1 to 9 of 9

substraction in column

  1. #1
    Registered User
    Join Date
    03-19-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    25

    substraction in column

    Hello forum

    In column A a have a set of numbers which varies from time to time. These numbers must be substracted from the previous ones.

    So if Range("A1:A12") the substractions must be

    A2-A1
    A3-A2
    A4-A3
    A5-A4 and so on.

    Substructions must start from the next not used cell in the same Column

    Since the range varies does anyone have an idea how to put all this in a code

    Thank you

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: substraction in column

    A2-A1 will be used in which cell? In A2 ah?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-19-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: substraction in column

    In next not used cell in Column A

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: substraction in column

    Sorry, unable to follow

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Registered User
    Join Date
    03-19-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: substraction in column

    I hope this helps
    Attached Files Attached Files

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: substraction in column

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Please Login or Register  to view this content.
    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  7. #7
    Registered User
    Join Date
    03-19-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: substraction in column

    Works great

    Just one more thing

    How can I remove the "$" from the code in case i wanted to autofill the substraction to the right -more coloumns with numbers?

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: substraction in column

    Replace this line

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-19-2014
    Location
    Greece
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: substraction in column

    Thank you so much

    Sorry i cannot add reputation

+ 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. substraction
    By faisal.ta in forum Excel General
    Replies: 1
    Last Post: 03-31-2014, 02:13 PM
  2. [SOLVED] Substraction - Re_Grouping
    By itselflearn in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-06-2013, 07:03 PM
  3. Substraction
    By bablubg in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-19-2012, 05:33 AM
  4. Columns SUBSTRACTION or something
    By masster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-31-2006, 03:59 PM
  5. Help - date substraction
    By TAKTOUKA in forum Excel General
    Replies: 17
    Last Post: 05-23-2005, 02:41 AM

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