+ Reply to Thread
Results 1 to 3 of 3

Empty cell to a zero value

  1. #1
    Registered User
    Join Date
    10-18-2011
    Location
    Knebworth, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Empty cell to a zero value

    Hi,

    Here is a macro that I use to pick up some values from one worksheet (PG Calculator) from a number of cells and add them to a new row on another worksheet (PGmixlist).
    One or two of the general formatted cells may be empty and thats fine they are copied across as empty. The output worksheet (PGmixlist) show the cells as empty, which is what I need.

    However, when I recall the records from a dropdown list it repopulates the original worksheet (PG Calculator) with the values but the empty cells come back as zeros. I need them to be empty. I've tried different cell formats general, text but I get the same result, zeros.

    any ideas please?


    Please Login or Register  to view this content.
    here is a cell formula that picks up the value based on the name from the drop down list.

    Please Login or Register  to view this content.
    Last edited by RobM_01; 10-23-2011 at 05:14 PM. Reason: Solved by TMShucks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Empty cell to a zero value

    =IF(VLOOKUP($K$6,PGmixList!A:W,16,FALSE)="","",VLOOKUP($K$6,PGmixList!A:W,16,FALSE))

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-18-2011
    Location
    Knebworth, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Empty cell to a zero value

    Quote Originally Posted by TMShucks View Post
    =IF(VLOOKUP($K$6,PGmixList!A:W,16,FALSE)="","",VLOOKUP($K$6,PGmixList!A:W,16,FALSE))

    Regards
    Thankyou that sorted that out perfectly.

    I looked around the net for the answer and it seems quite a few people had the same problem, but couldn't find the answer.

    Cheers Rob.

+ 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