+ Reply to Thread
Results 1 to 4 of 4

Check current cell is empty

  1. #1
    bobocat
    Guest

    Check current cell is empty

    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




  2. #2
    Jim May
    Guest

    Re: Check current cell is empty

    Sub tester()
    If IsEmpty(ActiveCell) Then
    MsgBox "Activecell Is Empty"
    Else
    MsgBox "Activecell Is Not Empty"
    End If
    End Sub

    "bobocat" <bobo.catgod@gmail.com> wrote in message
    news:#CILPNBoGHA.4636@TK2MSFTNGP03.phx.gbl:

    > 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



  3. #3
    Bobocat
    Guest

    Re: Check current cell is empty

    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?

    "Jim May" <jmay@cox.net> wrote in message
    news:uiNqg.51855$fG3.28141@dukeread09...
    > Sub tester()
    > If IsEmpty(ActiveCell) Then
    > MsgBox "Activecell Is Empty"
    > Else
    > MsgBox "Activecell Is Not Empty"
    > End If
    > End Sub
    >
    > "bobocat" <bobo.catgod@gmail.com> wrote in message
    > news:#CILPNBoGHA.4636@TK2MSFTNGP03.phx.gbl:
    >
    >> 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

    >




  4. #4
    Jim May
    Guest

    Re: Check current cell is empty

    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.


    "Bobocat" <bobo.catgod@gmail.com> wrote in message
    news:u9jWgdEoGHA.4232@TK2MSFTNGP02.phx.gbl:

    > 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?
    >
    > "Jim May" <jmay@cox.net> wrote in message
    > news:uiNqg.51855$fG3.28141@dukeread09...
    > > Sub tester()
    > > If IsEmpty(ActiveCell) Then
    > > MsgBox "Activecell Is Empty"
    > > Else
    > > MsgBox "Activecell Is Not Empty"
    > > End If
    > > End Sub
    > >
    > > "bobocat" <bobo.catgod@gmail.com> wrote in message
    > > news:#CILPNBoGHA.4636@TK2MSFTNGP03.phx.gbl:
    > >
    > >> 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

    > >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1