Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Check current cell is empty

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bobocat - 05 Jul 2006 10:13 GMT
Hi,

I'm getting stuck...

If I enter some new data in Sheet2, column A, then this cell will be copied
to last cell of sheet 1 columnA automatically. This task can be done now

IF the  data is overwriting some existing data, no need to copy.

my logic is
if the active cell is empty, and the target column is 1, then do the copy
and paste.
else, do nothing

The question is: how can I check the current cell is empty?

Thank you in Advance

Bobocat
Jim May - 05 Jul 2006 12:23 GMT
Sub tester()
   If IsEmpty(ActiveCell) Then
   MsgBox "Activecell Is Empty"
   Else
   MsgBox "Activecell Is Not Empty"
   End If
End Sub

> Hi,
>
[quoted text clipped - 15 lines]
>
> Bobocat
Bobocat - 05 Jul 2006 16:26 GMT
Sorry, It's not perfectly OK

In my test,

A1 empty
A2 empty
A3 Not empty

After I type something in A1, it return "Activecell is Empty", (it's ok)
But I type something in A2, it returns "activecell is not Empty"

I think that when I enter data in A2, when I press "Enter", the cursor will
move to A3, since the new Activecell is A3, so that is returns "not empty"

Can I check the cell before I enter the data?

> Sub tester()
>    If IsEmpty(ActiveCell) Then
[quoted text clipped - 24 lines]
>>
>> Bobocat
Jim May - 06 Jul 2006 23:13 GMT
The Macro works on the Current activecell.  That is, either before
or After you enter something in that cell.  You're right
You probably have your Tools, Options set to have your
Cursor move to the next-downward cell once you enter something
In for example A4 - A4 is the target of your data, yet (afterwards)
A5 is active.  So you would need to click again on cell A4 and run the
mcaro
It should tell you that A4 is not empty.

> Sorry, It's not perfectly OK
>
[quoted text clipped - 40 lines]
> >>
> >> Bobocat
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.