View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default GETTING DATA ON TO SHEET2

Try copying mine or the other Don's instead of typing it. The syntax is
correct.

--
Don Guillett
SalesAid Software

"tim lee" wrote in message
...
When I put this in it comes up in red - syntax error, but I have checked
carefully and retyped it twice - any idea what could be wrong - sheets are
indeed named sheet1 sheet2 and sheet3. Is that a reserved word [sheets]? I
am running mso2000 excel premium vers 9.0.2720

--
TIM LEE tax agent 55 807 001
4a/123 Colin St West Perth 6005
Tel 08 9481 0337 Fax 9321 0036

"Don Lloyd" wrote in message
...
Tim,

If Sheets("Sheet1").Range("A1")<0 then
Sheets("Sheet2").Range("D1")=Sheets("Sheet1").Rang e("A1")
End If

This should work regardless of which sheet you are on.

regards,
Don

"timothylee" wrote in message
...
I am trying to get data in sheet1 a1 (10) into sheet 2 d1 and it wont

run -
can you tell me where I am going wrong please?

Sub ad()
If Range("sheet1!a1") < 0 Then
Range("sheet2!d1").Select
Range("sheet2!d1") = Range("sheet1!a1")
End If
End Sub

--
TIM LEE tax agent 55 807 001
4a 123 Colin St
West Perth 6005
Tel 08/9481 0337 Fax 9321 0036