Automatic copy and paste
Task 1: Automatically copy and paste value from CELL NO H15 of a SHEET NO 1 OF A PASSWORD PROTECTED FILE- NAME A,ALREADY OPENED AT THE DESKTOP,into CELL NO G22 OF SHEET 2 OF ANOTHER FILE -NAME B ALREADY OPENED AT THE DESKTOP.
[FILE A(password protected)(already opened),,SHEET 1,,CELL H15] ---PASTE TO---[FILE B(already opened),,SHEET 2,,CELL G22]
Task 2: When i put the formula =(F12/8) in a cell, i get the result in decimal position, but i want a round figure and only upto one digit.For example it should show the resultant 2.3575 as 2 and 2.8575 as 3.
thank you
Regards
Ruth
Get value from other workbook.
Hi Ruth,
Could you not just do this?
='[Test1 From.xls]Sheet1'!$H$15
You have not indicated if the recieving sheet is protected so I will assume it is not,if you wanted a VBA code for this then.
Sub ToOtherSheet()
Dim Wb1 As Workbook, Wb2 As Workbook
Dim Sh1 As Worksheet, Sh2 As Worksheet
Dim Rng1 As Range, Rng2 As Range
Set Wb1 = Workbooks("Test1 From.xls")
Set Wb2 = Workbooks("Test1 To.xls")
Set Sh1 = Wb1.Worksheets("Sheet1")
Set Sh2 = Wb2.Worksheets("Sheet2")
Set Rng1 = Sh1.Range("H15")
Set Rng2 = Sh2.Range("G22")
Rng2 = Rng1
End Sub
Try the Round Function for your other question,
=ROUND(F12/8,0)
davesexcel.com
That was me
I Replied to this question before realizing how to log on...