+ Reply to Thread
Results 1 to 4 of 4

Summing two cells prior to pasting

  1. #1
    Registered User
    Join Date
    08-13-2018
    Location
    taylor mill, kentucky
    MS-Off Ver
    2010
    Posts
    61

    Summing two cells prior to pasting

    Hello All,

    This is probably an easy one but im not sure how to go about it. I will list my current macro that I have below and a picture of where the data is being extracted from to see what I mean. I need the overtime pay and regular pay to be summed into one amount prior to pasting the data on a different sheet.

    Also this code has a lot of repetition to it and im sure there is a better way to handle this than how I did. If you would like to chime in on that as well I would be open to it but no need if you wouldn like to.
    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Summing two cells prior to pasting

    I hope that it's what you need.

    I used this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-13-2018
    Location
    taylor mill, kentucky
    MS-Off Ver
    2010
    Posts
    61

    Re: Summing two cells prior to pasting

    Looking over this code it looks like it would work. The only issue that I am having is this part

    Please Login or Register  to view this content.
    Says subscript out of range.

    To give a better idea of why this might be happening. There is a lot of information on each one of these pages, and I need the data that is transferred over to start on row 213 and then utilize every line after that. In my original code that I put I wrote that code as

    Please Login or Register  to view this content.
    Utilzing

    Please Login or Register  to view this content.
    to make this work

    Please let me know any solutions you may have to get this part of the code to work in the answer that you provided.

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Summing two cells prior to pasting

    Maybe macro is looking for the last row on a sheet but it seems that the sheet doesn't exist.

    Please check the names of the sheets.

    Regards,
    Antonio

+ 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] Code to delete data prior to pasting new data is REALLY slow
    By Reapz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-19-2015, 04:41 PM
  2. Replies: 1
    Last Post: 02-26-2015, 06:12 PM
  3. [SOLVED] Formula to get (Prior Biz Day) and (Prior Biz Day -1); ex-holidays
    By Phillycheese5 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2013, 09:29 AM
  4. [SOLVED] Help with summing prior four non zero values please?
    By ChristopherHac in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-06-2013, 05:04 AM
  5. Help with IF statement formula in summing prior data.
    By asburytl in forum Excel General
    Replies: 3
    Last Post: 09-06-2011, 03:42 PM
  6. Populate required cells prior to saving
    By mhart210 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-30-2006, 11:44 AM
  7. Replies: 1
    Last Post: 08-28-2005, 09:05 AM

Tags for this Thread

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