Share via

Copy multiple rows from a sheet into another sheet, based on a single criteria the header page! EXCELVBA?

Anonymous
2024-10-29T14:51:21+00:00

Trying to formulate the question itself was hard enough, so I hope this makes sense.

Based on a single cell "AAA" selected from a drop down list in the header page, I need it to search through a sheet "Rates" A1..W912 and then copy the rates that match criteria "AAA" into another sheet "Working_Rates", from row 2 until there are no more matching criteria.

Each time that the "AAA" is changed, say to "ZZZ", it should erase the previous rates in "Working_Rates" and replace with "ZZZ".

I hope that this makes sense and appreciated anyones/everyones assistance.

I have tried some examples from this and other websites, to no avail!

Many thanks,

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2024-10-29T18:50:51+00:00

    Could you create a stripped-down copy of the workbook demonstrating the problem (without sensitive information) and make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file here.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-10-29T15:47:53+00:00

    Hans, thank you - however for some reason I am getting a #VALUE!

    Could this be because the criteria cell is a drop down selection?

    If so then I would need to find a way to copy that to another cell, however this would have to be converted to TEXT, and not the formulae itself - something I have also been looking to find out how to do!

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2024-10-29T15:17:24+00:00

    Let's say that the drop-down is in cell B1 on a sheet named Header Sheet.

    In A2 on the Working_Rates sheet:

    =FILTER(Rates!A1:W912, Rates!A1:A912='Header Sheet'!B1, "- No Matches -"

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-10-29T15:07:05+00:00

    Hi HansV

    All matching cells (criteria) COULD be elsewhere in that worksheet, however I only need it to select based on the value (matching criteria) in column A.

    Many thanks,

    Was this answer helpful?

    0 comments No comments
  5. HansV 462.6K Reputation points
    2024-10-29T14:54:13+00:00

    Are the matching cells to be found in a specific column? If so, which one?

    Or can they be in any column in A1:W912?

    Was this answer helpful?

    0 comments No comments