Spreadsheet Data

Closed
Ed - 8 Sep 2015 à 23:03
vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 - 9 Sep 2015 à 06:01
Hello,

I would like to know how to set up a formula so when I enter a certain value or text into a cell i.e "C" all of the information in that row will appear on another spreadsheet



1 response

vcoolio Posts 1411 Registration date Thursday 24 July 2014 Status Contributor Last seen 6 September 2024 262
9 Sep 2015 à 06:01
Hello Ed,

Firstly, please familiarise yourself with the CCM charter, in particular this part of it:-

https://ccm.net/apps-sites/internet-archeology/ccm/10131-terms-of-use-for-ccm-respect-for-others/#politesse

You've escaped having your thread closed.........this time!

Now to your query:-

I have no idea what your data set looks like but I think that the following code will do as you would like:-


Sub CopyStuff()

Application.ScreenUpdating = False

With ActiveSheet
    .AutoFilterMode = False
    With Range("A1", Range("A" & Rows.Count).End(xlUp))
        .AutoFilter 1, "C"
        On Error Resume Next
        .Offset(1).EntireRow.Copy Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1)
    End With
    .AutoFilterMode = False
End With

Application.ScreenUpdating = True
Sheet2.Select

End Sub


The code assumes that the criteria "C" will be in Column A of sheet 1. When "C" is typed into any cell in Column A of your data set, the entire relevant row of data will be transferred to sheet 2.

Following is a link to my test work book for you to peruse:-

https://www.dropbox.com/s/b7xmw9eva4ndrpv/Ed.xlsm?dl=0

Place "C" in any cell of Column A, click on the Copy Data button and the data of the relevant row will be transferred to sheet 2.

I hope that this helps.

Cheerio,
vcoolio.