View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default GETTING DATA ON TO SHEET2

Hi Tim,
Are you getting an error?
Did you record a macro, you don't need to make a selection,
and to process only one cell or even one column doesn't seem
to warrent a macro when you can use a worksheet function
to keep things up to data instantly.

Wouldn't simply putting a formula into Sheet2!d1 suffice?
=IF(sheet1!A1=0,,sheet1!A1)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"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