Results 1 to 8 of 8

Check if current (active) cell is empty

Threaded View

  1. #1
    Registered User
    Join Date
    08-11-2015
    Location
    NH, USA
    MS-Off Ver
    2010
    Posts
    4

    Check if current (active) cell is empty

    This macro looks for the last non-empty cell in column C, then selects the cell to left of it (column B).
    I wanted the macro to then check if this neighboring cell is empty or not and display a message box if True, however when I run it the box never shows up.

    When I replace the X in IsEmpty(X) to a regular cell location like IsEmpty(B22) it works fine. Reason why it has to be non-fix location is because the rest of the macro I'm making is combining rows from many workbooks into a master workbook so the last row location keeps moving down.

    Thanks for the help.

    Sub Sample()

    Range("C1").Select
    Selection.End(xlDown).Select
    X = ActiveCell.Offset(0, -1).Select

    ' Test if the value in neighboring cell is blank/empty
    If IsEmpty(X) = True Then
    MsgBox "Cell is empty"
    End If

    End Sub
    Last edited by Lycan004; 08-20-2015 at 04:33 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 12-10-2013, 02:10 AM
  2. [SOLVED] copy and paste in current active cell, and need current date then scroll down 140 lines
    By vengatvj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2013, 03:40 AM
  3. VBA - Can I select a new active cell based on the value of the current active cell?
    By GrumpyOldBastard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2012, 07:05 PM
  4. Identify the Current Active Cell
    By staanley in forum Excel General
    Replies: 2
    Last Post: 02-08-2008, 05:34 AM
  5. Populate current active cell - Help Please!!
    By Larry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-19-2006, 05:25 PM
  6. [SOLVED] Check current cell is empty
    By bobocat in forum Excel General
    Replies: 3
    Last Post: 07-06-2006, 06:20 PM
  7. Identify current active cell
    By reades in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-10-2006, 08:55 AM
  8. Check if Active Workbook is Empty
    By scantor145 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2005, 11:05 AM

Tags for this Thread

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