+ Reply to Thread
Results 1 to 5 of 5

Returning a Row from a Worksheet based on Row Reference

  1. #1
    Registered User
    Join Date
    07-09-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    11

    Returning a Row from a Worksheet based on Row Reference

    Hi,



    I have a spreadsheet with 3 tabs in it.



    1. Model Overview Sheet - This sheet has all the raw data that will drive the outcomes in the 'Copier' and 'Return Row' worksheets.



    2. Copier - In column A of the Model Overview Sheet, there are SSR references. In column A of the 'copier' sheet, the user manually types in the relevant SSR references and in Column B a formula looks up the row that the SSR reference corresponds to, and returns it in column B. For example the SSR Reference 12 corresponds to line 14 in the 'Model Overview Sheet' .



    3. 'Return Row' - This has 3 fixed rows in it which are, rows 1&2 from 'Model Overview Sheet' and the last row from 'Model Overview Sheet' which sums up the respective columns.


    Based on the value in Column B of 'Copier' Sheet, which is the row reference to the row in the 'model overview sheet' , I would like the entire row that corresponds to each row reference found in 'copier', to be returned in the 'Return Row' sheet, and then for all those rows to have their rows added.

    I have attached th Excel Worksheet to give you a better picture of what is needed.

    Can anyone help?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Returning a Row from a Worksheet based on Row Reference

    Hi

    Please find attached a copy of your file with some code attached to copy the SSR row.

    The copier sheet is not needed as it is all done in VBA

    If it is not what you need please let me know.

    Regards

    Jeff
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Returning a Row from a Worksheet based on Row Reference

    Thanks for your help Jeff,

    However it is not exactly what I want.

    I have changed something in the copier sheet in column A, the values in that column are now extracted from another spreadsheet.

    So based on that, I would like all the rows based on row reference in column B of 'copier' to be copied into 'Return Row' at once.

    Also I noticed your macro just pastes over the budget totals row that I had in, that was used to add up the column values in each column of 'Return Row' . I need that 'Budget Totals' row to remain, moving down and readding as each new row is inserted.

    I hope that helps, thanks a lot for your help.

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Returning a Row from a Worksheet based on Row Reference

    Hi

    Try the amended version to see if it suits better

    Regards

    Jeff
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-09-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Returning a Row from a Worksheet based on Row Reference

    Hi Jeff,

    Thanks for your help that works well. If I wanted to add a column called 'Qty' in column C of 'Copier' is it possible to modify the macro so that it copies the relevant row based on row reference and then multiplies each value in the row by the value in the Qty column and then pasting the row with the 'Qty' multiplier value in the required worksheet?

    Thanks so much !

+ 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