+ Reply to Thread
Results 1 to 5 of 5

Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

  1. #1
    Registered User
    Join Date
    01-13-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

    Sheet A, Column A is a list of tasks that can grow according to the owner. Column B through E are data columns that are imaged in sheet B, currently there are only 30 rows in Sheet B. I have protected sheet A so users can not corrupt the equations. Macros already established are "Insert Row" which finds the last active row and inserts a new one as well as "Insert Month" which copies the columns from Sheet B and pastes them to the right of the last group of month column for the new month of data entry.

    Due to the fact that rows can be added beyond the initial 30 rows, I would like to develop a macro that would count the active rows in Sheet A, copy the same amount of rows from sheet B and paste them similarly to my "insert month" function. I think if I can get help in the count, match count, copy amount part, I can insert it into the "insert month" macro easily enough.

    Thanks in advance for the help on my first post!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Keep it simple
    Doing this will ensure you get the result you need!

  3. #3
    Registered User
    Join Date
    01-13-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

    Dave, how do I go about attaching a dummy sheet? I do not see an attach button anywhere on the reply header. If providing a link is the best way, could you suggest the best method or site to host something like this?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

    Click new post

  5. #5
    Registered User
    Join Date
    01-13-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A

    Sorry for the delay, holiday weekend and the file was at work. Please review the attached example. Sheet 1 is the data sheet, Sheet 2 would be the copy and paste sheet and sheet 3 would be how I would like sheet 1 to look after c/p with a new month and rows.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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