Spreadsheet Data [Closed]

Report
-
Posts
1310
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
July 26, 2021
-
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 reply

Posts
1310
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
July 26, 2021
232
Hello Ed,

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

https://ccm.net/contents/948-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.

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!