copy a row of data and insert different part of that row into different cells on a different sheet

cashmp

New Member
Joined
Oct 10, 2015
Messages
14
So I have a database sheet which contains information and results and i want to find a row copy that row the paste different columns in to different cells on a different sheet

Heading are as such
Name, number, date of test, results1, results2 and so on, and i want to insert name in to sheet2 cell "f14" and number into cell "w13"

I am thinking some thing like copy activecell.row to a range then copy the different columns to the different cells but i dont have the code

any help would be apricated

thanks

Pat
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).

attached is the full file i am working on i am trying to fill the cert and cert_tx with data from the database sheet depending on the type of instrument it will copy the data to the different sheets (cert, Cert_tx)

I hope i have confused you with all the file

pat
 
Upvote 0
Could you please describe in detail, referring to specific cells, rows, column and sheets using a few examples from your data.
depending on the type of instrument
How does the type of instrument determine which cells to copy. How do you decide which sheet, cert or cert_tx, to fill out? Please explain which cells from the database you want to use to fill out each cell on the cert and cert_tx sheets. I need a step by step description.
 
Upvote 0
OK
if you run the macro Ctrl+F which opens a form which writes to the database
i was trying to bring the data back top the form and rewrite it to the cert and cert_tx sheets


this bit of code works for me to give me a active worksheet
Dim lastempty As Long
Dim lastrow As String
lastempty = Sheets("Database").Cells(Rows.Count, 2).End(xlUp).Row + 1
lastrow = Worksheets("Database").Cells(Rows.Count, 2).End(xlUp).Row
If Sheets("Database").Cells(lastempty, 3).Value = "" Then GoTo skip
If CB1_instrument.Text = "TEMPERATURE TRANSMITTER" or "PRESURE TRANSMITTER" Then
Worksheets("cert_tx").Activate
Else
Worksheets("Cert").Activate

I have a form which I am using as a go between

'Range("j9").Value = CB1_instrument.Value
'Range("f14").Value = TB1_customer.Value
'Range("f16").Value = TB2_address.Value
 
Upvote 0
It would be easier to test a possible solution if you could upload a copy of your file to a free file sharing site and post a link to the file here.
 
Upvote 0
I'm still not quite clear. You have several userforms and a lot of code. To be honest, I don't have time to go through all of your code. Also, some of your code is disabled so I don't know if that code is necessary or not. Given all of this, I would like to narrow down to what you are trying to do. Do you want to use the "Details" userform both to insert data in the database and to modify data in the database? If you want to modify the data, how do you determine which row (serial number) in the database to modify?
 
Upvote 0
I'm still not quite clear. You have several userforms and a lot of code. To be honest, I don't have time to go through all of your code. Also, some of your code is disabled so I don't know if that code is necessary or not. Given all of this, I would like to narrow down to what you are trying to do. Do you want to use the "Details" userform both to insert data in the database and to modify data in the database? If you want to modify the data, how do you determine which row (serial number) in the database to modify?
no worries i have worked around it by loading the details userform from the database and then out to the different sheets

thanks again for even looking at it, it a lot of cade to do small bit and now i am trying to bolt it all together so working away learning as i go but thats some of the fun

thanks

pat
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top