+ Reply to Thread
Results 1 to 4 of 4

Check for blank arguments WITHIN Macro - how?

  1. #1
    Registered User
    Join Date
    04-04-2005
    Posts
    9

    Check for blank arguments WITHIN Macro - how?

    I need to check WITHIN a macro if an argument is blank. A cell, used as argument, which has no value entered is in my case undefined, Excel makes it zero, and I cannot find any way to test it.
    I know I can do it BEFORE I pass an argument to the macro [e.g.: IF(A1="","whatever",A1)], but I like to do it inside the macro.

    Is there a way? How?

    Thanks in advance for any help / ideas.

    Juergen

  2. #2
    Tom Ogilvy
    Guest

    Re: Check for blank arguments WITHIN Macro - how?

    if isempty(cell) then

    or
    if len(trim(cell)) = 0 then

    if it must be a number

    if not isnumeric(cell) then

    --
    Regards,
    Tom Ogilvy


    "JuergenL" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I need to check WITHIN a macro if an argument is blank. A cell, used as
    > argument, which has no value entered is in my case undefined, Excel
    > makes it zero, and I cannot find any way to test it.
    > I know I can do it BEFORE I pass an argument to the macro [e.g.:
    > IF(A1="","whatever",A1)], but I like to do it inside the macro.
    >
    > Is there a way? How?
    >
    > Thanks in advance for any help / ideas.
    >
    > Juergen
    >
    >
    > --
    > JuergenL
    > ------------------------------------------------------------------------
    > JuergenL's Profile:

    http://www.excelforum.com/member.php...o&userid=21816
    > View this thread: http://www.excelforum.com/showthread...hreadid=518350
    >




  3. #3
    Registered User
    Join Date
    04-04-2005
    Posts
    9
    Thanks for the quick answer, I tried 'em all and but none work WITHIN the macro. By that time the blank cell is already converted to zero, it seems.

    Juergen

  4. #4
    Tom Ogilvy
    Guest

    Re: Check for blank arguments WITHIN Macro - how?

    What can I say. Perhaps someone who is psychic can help.

    --
    Regards,
    Tom Ogilvy


    "JuergenL" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the quick answer, I tried 'em all and but none work WITHIN
    > the macro. By that time the blank cell is already converted to zero, it
    > seems.
    >
    > Juergen
    >
    >
    > --
    > JuergenL
    > ------------------------------------------------------------------------
    > JuergenL's Profile:

    http://www.excelforum.com/member.php...o&userid=21816
    > View this thread: http://www.excelforum.com/showthread...hreadid=518350
    >




+ 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