Check if Cell Is Empty

  • please see attached spreadsheet, if you copy cells from K3 to N92 into A3 to D92, data will be automatically shown up in columns F to I.

    But there's a problem, whenever there's a cell contains 0% in col B-D, the corresponding cell in col G-I will be empty which affects the calculation therafter, can anyone help on this?


  • Re: Vb Treats 0 As Empty Too


    Changed: If cell.Value <> Empty Then

    To: If cell.Value <> Empty Or cell.Value = 0 Then

    Seems to work for me.



  • Re: Vb Treats 0 As Empty Too

    by using "If cell.Value <> Empty Or cell.Value = 0", it solves the problem of 0% cells, but anothe problems raises, if u delete some monthly returns in Col B-D (e.g. if u delete the last 3 months' returns), the corresponding cells in Col G-I don't clear contents..

    I think it's the same thing again, as VB treats 0 as empty, so it will never jump to the else statement


  • Re: Check if Cell Is Empty

    If cell.Value <> Empty Or cell.Value = 0

    Didn't work for me either...even empty cells returned 0 for me....I used:

    If Len(cell.Value) > 0

    (Don't want to be a grave digger here, but I bumped on this thread via google, and suppose more people will....)

  • Re: Check if Cell Is Empty


    We're glad to have you at Ozgrid.

    However, do not post your questions in a thread started by others - - this is known as thread hijacking and is a violation of the forum rules.
    See the link in my signature for access to the Forum Rules, which if you have not read, take time to read them to avoid infractions.

    Start a new thread for your question.

  • Re: Check if Cell Is Empty


    Seems I owe you an apology. Since I publicly called you on posting in an old thread, I am apologizing publicly.
    As rbrhodes points out you did provide a answer - and did not ask a question.

    We get enough of these errors of posting questions in old threads and when I saw your post count as "1", I really didn't take enough time to review your post.

    rbrhodes -- thanks for pointing this out.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!