Go Back  PPRuNe Forums > Misc. Forums > Computer/Internet Issues & Troubleshooting
Reload this Page >

Excel - entering data in one worksheet that is copied to several

Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Excel - entering data in one worksheet that is copied to several

Thread Tools
 
Search this Thread
 
Old 18th Oct 2010, 16:10
  #1 (permalink)  

Pilots' Pal
Thread Starter
 
Join Date: Nov 1998
Location: USA
Age: 63
Posts: 1,158
Likes: 0
Received 0 Likes on 0 Posts
Excel - entering data in one worksheet that is copied to several

Hi All,
I've had lots of help here before so I'm anticipating success...
I'm running Excel 2007 and have a workbook I use to track the issue of certificates and use several sheets that contain templates for the various types of certificate issued.
I've worked out how to use =Sheet1!a10 to allow a cell value entered in Sheet 1 A10 to be copied to as many cells as I want in other worksheets. That has really helped.
However, Sheet 1 of the workbook contains columns of certificate numbers (so no duplicates), names, organisation, course reference and date of attendance.
I want to be able to enter these values in a row so that the data will be copied to the certificate template (doesn't matter if copied to all, I'll only print the one I need) allow me to print and then with every subsequent row I enter on Sheet 1, overwrite the data that was in the certificate from the previous row. Obviously, the data in Sheet 1 is unique and has to remain as a record but the cells on the certificate templates can be overwritten because I print to PDF every time I complete a row in Sheet 1. If I can add a button to a frozen pane on Sheet 1 that allows me to print the certificate I want, even better.
Is it possible?
Bus429 is offline  
Old 18th Oct 2010, 17:09
  #2 (permalink)  
 
Join Date: Nov 2005
Location: UK
Age: 41
Posts: 56
Likes: 0
Received 0 Likes on 0 Posts
Hi bus,

I've done a bit of macro writing in excel before and it won't be a problem to do what you've asked, even the printing from a button bit.

I'll have a quick look now and see what i come up with.
Rob82 is offline  
Old 18th Oct 2010, 17:28
  #3 (permalink)  

Pilots' Pal
Thread Starter
 
Join Date: Nov 1998
Location: USA
Age: 63
Posts: 1,158
Likes: 0
Received 0 Likes on 0 Posts
Thank you Rob
Bus429 is offline  
Old 18th Oct 2010, 17:59
  #4 (permalink)  
 
Join Date: Nov 2005
Location: UK
Age: 41
Posts: 56
Likes: 0
Received 0 Likes on 0 Posts
Right here we go.

I think i've done what you asked but if it need changing in anyway just let me know.

I don't know if your familar with macros in excel, i'll write this as if you don't with step by step instructions.

1. Open the developer tab and select Visual Basic (you may need to go into excel options and select Show Developer tab in the Ribbon.)

2. In the left hand side of the visual basic page there will be a folder named Modules, left click this and select Insert and then Module.

3. Copy the text below into the white screen in the new module.

Sub Certificate()
Row = ActiveCell.Row
Sheet2.Range("A1") = Sheet1.Cells(Row, "A").Value
Sheet2.Range("A2") = Sheet1.Cells(Row, "B").Value
Sheet2.Range("A3") = Sheet1.Cells(Row, "C").Value
Sheet2.Range("A4") = Sheet1.Cells(Row, "D").Value
Sheet2.Range("A5") = Sheet1.Cells(Row, "E").Value
Sheet2.PrintOut
End Sub

You can change the Sheet2.Range("A1"), Sheet2.Range("A2"), etc. to the cells in the certificate that you need. i.e. Sheet2.Range("G16")

4. Now go to Sheet1 in the workbook and click the Developer Tab in the ribbon, then Insert, and then the Button under Form controls.

5. Click Where you want the button to be on the worksheet. If you freeze the top row of the worksheet then if the button is there it will always be available. When you place the button it will open a window to select a macro to associate with it select "Certificate" and OK.

All should then be working.

The way it works is whichever row the activecell is in, is the row of data that will be copied over and printed. So if you want to print the certificate on row 21 just select any cell in row 21 and click the button.

While your playing with it you can change the Sheet2.Printout to Sheet2.PrintPreview so you'll just get the print preview page rather than having to keep printing the pages.

Hope this helps. Let me know how it goes.

Rob
Rob82 is offline  
Old 18th Oct 2010, 19:13
  #5 (permalink)  

Pilots' Pal
Thread Starter
 
Join Date: Nov 1998
Location: USA
Age: 63
Posts: 1,158
Likes: 0
Received 0 Likes on 0 Posts
Thanks Rob - I'll give it a go an get back to you.

Bus
Bus429 is offline  
Old 19th Oct 2010, 08:22
  #6 (permalink)  

Pilots' Pal
Thread Starter
 
Join Date: Nov 1998
Location: USA
Age: 63
Posts: 1,158
Likes: 0
Received 0 Likes on 0 Posts
Hi Rob,
Got as far as opening Visual Basic but there is no folder bar with "Modules".
Bus429 is offline  
Old 19th Oct 2010, 10:07
  #7 (permalink)  
 
Join Date: Nov 2005
Location: UK
Age: 41
Posts: 56
Likes: 0
Received 0 Likes on 0 Posts
Ah right sorry.

You see on the left where it says VBAProject (name of worksheet) and below that Microsoft Excel objects?

Just right click anywhere in that white box and select Insert and Module.
Rob82 is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.