Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2010, 02:15 PM
mrphilk mrphilk is offline Copying data from one cell to another automatically Windows XP Copying data from one cell to another automatically Office 2003
Novice
Copying data from one cell to another automatically
 
Join Date: Jul 2009
Posts: 8
mrphilk is on a distinguished road
Default Copying data from one cell to another automatically

Hi



You may have seen my earlier post about invoice numbers. Well I almost have it cracked I just need to copy some data. My layout is similar to this;

A B

1 X Y
2
PK00001
3 PK00002
4 PK00003
5 PK00004
6 PK00005
7 PK00006

So, for example, if X (A1) is 1, then I would like the value from A2 (PK00001) to be displayed in B1.

Likewise if A1 is 2, then PK00002 and so on.

Is there a formula to do this?

Thanks
Reply With Quote
  #2  
Old 06-10-2010, 02:47 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline Copying data from one cell to another automatically Windows XP Copying data from one cell to another automatically Office 2003
Simulacrum
 
Join Date: Jan 2010
Location: Victoria, Canada
Posts: 86
ConneXionLost is on a distinguished road
Default

I suspect this will (or won't) be useful depending on your context, but give this a try:

Code:
=INDEX($A$2:$A$7,A1,1)
Cheers,
Reply With Quote
  #3  
Old 06-10-2010, 03:00 PM
Kimberly Kimberly is offline Copying data from one cell to another automatically Windows 7 Copying data from one cell to another automatically Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

I'm real curious as to what you're doing... I still don't understand.

Are you placing values in cells or naming workbooks, or both, or what?

Where are the initials... I see PK, but what if the person isn't Phil?
Reply With Quote
  #4  
Old 06-10-2010, 11:48 PM
mrphilk mrphilk is offline Copying data from one cell to another automatically Windows XP Copying data from one cell to another automatically Office 2003
Novice
Copying data from one cell to another automatically
 
Join Date: Jul 2009
Posts: 8
mrphilk is on a distinguished road
Default

Quote:
Originally Posted by Kimberly View Post
I'm real curious as to what you're doing... I still don't understand.

Are you placing values in cells or naming workbooks, or both, or what?

Where are the initials... I see PK, but what if the person isn't Phil?
I know it seems cofusing as I did miss out a piece of vital information in my earlier post (sorry about that :-) )

Each sheet is unique to the staff member, they will have their own copy on their lap top (there's only 18 of us so not so bad).

So, basically what I have done is create a data list right at the bottom of the sheet with a similar set up as I showed above.

NExt I addedd a combo box, linked to this list and the number at the top of the lsit will incrememnet the box.

Next I have added a `save sheet as` button to the work sheet which saves the sheet in the following format;

PK00001, EngineerName, Customer, CustomerLocation.xls

This uses the following macro;

Sub savesheets()

Range("a103").Value = Range("a103").Value + 1

ActiveWorkbook.Save

Range("a103").Value = Range("a103").Value - 1

Dim newfile As String, ssno As String, eng As String, cust As String, loc As String

ssno = Range("J2").Value
eng = Range("E6").Value
cust = Range("e4").Value
loc = Range("j4").Value

newfile = ssno & " " & eng & ", " & cust & " " & loc & " Service Report.xls"
ChDir _
"C:\Documents and Settings\KHS\Desktop\Drafts"
ActiveWorkbook.SaveAs Filename:=newfile

End Sub


As you can see the macro first increments the order number by 1, saves the file, then drops it back down again before saving the file in the required format.

I will finally create a macro which will delete all of the other fields in the sheet when it is opened, this will create a blank sheet each time.

It has been a bit higgldy=piggldy as Ive been working on this ruddy thing for about 4 weeks now and the more ideas I google the further the sheet goes......
Reply With Quote
  #5  
Old 06-10-2010, 11:52 PM
mrphilk mrphilk is offline Copying data from one cell to another automatically Windows XP Copying data from one cell to another automatically Office 2003
Novice
Copying data from one cell to another automatically
 
Join Date: Jul 2009
Posts: 8
mrphilk is on a distinguished road
Default

Quote:
Originally Posted by ConneXionLost View Post
I suspect this will (or won't) be useful depending on your context, but give this a try:

Code:
=INDEX($A$2:$A$7,A1,1)
Cheers,
Thanks, this works great, now time to `put it in` he he!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to do this? (automatically enter text based on form data) TIKKI555 Word 0 05-26-2010 09:21 AM
Copying data from one cell to another automatically Copying contents of CDs trissn Office 2 02-05-2010 09:27 AM
Copying data from one cell to another automatically Worksheet copying? markg2 Excel 4 01-07-2010 10:08 AM
Auto-populate an MS Word table cell with text from a diff cell? dreamrthts Word Tables 0 03-20-2009 01:49 PM
Automatically entering/fill data in cells in Excel 2003 dipdog Excel 0 08-17-2006 08:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft