Hi
I found the solution. Very simple just added
..Cells(c.Row, c1.Column) = EstWorkLoad
to the code
Would it be possible to write to a closed excel workbook? An how could this
be done in the code?
Thank you for your help
Ticotion
"Ticotion" wrote:
Hi Joel
This almost works as I want. One thing is though that in row 13 in the
destsht the code has to find the Estworkload or the realworkload, then have
to find the weekno, and then insert the value that corrisponds to to row13
headlines. How whould this be done?
Br.
Ticotion
"joel" wrote:
Modify as required
Sub MoveData()
Set sourcesht = Workbooks("Book1.xls").Sheets("Sheet1")
Set DestSht = Workbooks("Book2.xls").Sheets("Sheet1")
With sourcesht
Person = .Range("A1")
EstWorkLoad = .Range("C4")
RealWorkLoad = .Range("C5")
WeekNum = .Range("F2")
End With
With DestSht
Set c = .Range("A16:A35").Find(what:=Person, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
Set c1 = .Rows(15).Find(what:=WeekNum, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c1 Is Nothing Then
.Cells(c.Row, c1.Column) = EstWorkLoad
End If
End If
End With
End Sub
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=163315
Microsoft Office Help
.