+ Reply to Thread
Results 1 to 3 of 3

If text in one cell, then return an error message if any other cell in that row is blank

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    If text in one cell, then return an error message if any other cell in that row is blank

    Hi,

    Okay. So say in cell A1, i have text (it could be blank also). I want to return a message box that says "error: must enter a number" if any of the cells in row A are blank. But the cells only return this error if there is text in cell A1. Any VBA code would be helpful.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: If text in one cell, then return an error message if any other cell in that row is bla

    What is the code that you already have? It may be needing just a minor tweak.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    09-18-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If text in one cell, then return an error message if any other cell in that row is bla

    Arlette,

    I have not created the code yet. I have looked around numerous websites trying to figure this out, but have not found any answers. Let me clarify what I originally said (confuses me a little haha). Okay so is there VBA code where I can reference cell B10 and if that cell has any sort of text in it (not blank) then cells D10:J10 must have a number. If a number is not entered when they try clicking on a button called "rungraph" (macro) then an error message will come up saying "Error: must enter number into cells D10:J10"

    I hope this helps clarify my question. Any help would be much appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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