+ Reply to Thread
Results 1 to 14 of 14

Faster Way to Substract 2 Columns?

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Faster Way to Substract 2 Columns?

    Please Login or Register  to view this content.
    Is there a faster, better way?
    Thank You,

    EnigmaMatter

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Faster Way to Substract 2 Columns?

    Perhaps

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Faster Way to Substract 2 Columns?

    Curiosity, why does this work so much better than my script?

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Faster Way to Substract 2 Columns?

    Because access to the spreadsheet is limited to the minimum:
    All data is read and put in memory in one shot: Wktb1 = WkRg, WkTb2 = WkRg
    Treatment is done in memory
    Complete result is written in one shot in the cells
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Faster Way to Substract 2 Columns?

    try
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Faster Way to Substract 2 Columns?

    Mr. Jindon What if I want the results to be in Q2:Q & LastRow?

  7. #7
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Faster Way to Substract 2 Columns?

    PCI,

    It bugs on:

    Please Login or Register  to view this content.
    in line:

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Faster Way to Substract 2 Columns?

    Can you send a short sample of your data, with mine it was OK
    Perhaps try depending of your data
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 01-21-2015 at 04:58 PM.

  9. #9
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Faster Way to Substract 2 Columns?

    It looks identical except it is in a table...but yours works in a table too...

  10. #10
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Faster Way to Substract 2 Columns?

    PCI,

    Your substitute line worked! Thanks!

    Why did it work?

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Faster Way to Substract 2 Columns?

    I have the "feeling" there is not only numbers in your data, that's why it is always better to have a sample ...!

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Faster Way to Substract 2 Columns?

    Mr. Jindon What if I want the results to be in Q2:Q & LastRow?
    Thanks advanced

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Faster Way to Substract 2 Columns?

    Please Login or Register  to view this content.

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Faster Way to Substract 2 Columns?

    Thanks a lot Mr. Jindon

+ 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. Faster way to COUNTIF across multiple columns for datesets over 100,000 rows
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2014, 05:44 PM
  2. Replies: 12
    Last Post: 01-30-2014, 01:33 AM
  3. [SOLVED] Faster way to copy and paste multiple columns in Sheet1 to corresponding columns in Sheet2
    By babbeleme1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2013, 12:55 AM
  4. [SOLVED] 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
  5. [SOLVED] Can faster CPU+larger/faster RAM significantly speed up recalulati
    By jmk_li in forum Excel General
    Replies: 2
    Last Post: 09-28-2005, 06:05 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