Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel can I copy row based on cell value? 1

Status
Not open for further replies.
Mar 26, 2001
20
0
0
US
Hello, I would like to know if it is possible to copy a row based on a cells value to another worksheet.
So if for example cell Sheet1 D1=a I would want to copy A1,B1 and C1 to sheet2, if D1=b I would want to copy A1,B1 and C1 to sheet3. Thanks Kevin

 
codedipper,

From your description, I visualize two possible scenarios:

1) that your Sheet1 is being used as an Input sheet, and you want to transfer the data from A1,B1,C1 to either Sheet2 or Sheet3, based on the value entered in D1.

2) that your Sheet1 is a "database" with a large number of records, and you want to selectively extract records (based on each record in column D containing either an "a" or a "b") to either Sheet2 or Sheet3.

In BOTH cases, it's possible to have VBA code (attached to a button) that would perform either task.

A preferable approach to coming up with an accurate solution would be for you to email a copy of your file. A solution could then be provided and the file emailed back.

If you'd like to email me a copy (with confirmation as to your objectives), I'll help in providing a solution. If you happen to have sensitive data, replace it with fictitious data that still reflects the type of data you're working with.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top