+ Reply to Thread
Results 1 to 13 of 13

Cell References data that doesn't exist?

  1. #1
    Registered User
    Join Date
    03-31-2008
    Posts
    28

    Cell References data that doesn't exist?

    When I use the formula:
    Please Login or Register  to view this content.
    it spits out 1/0/1900 even though the cell is blank. Where is this data coming from?

    It only does this on some cells, which is why it doesn't make sense

    Secondly, for the cells that are blank and don't have this problem it displays a "0", is there a way to have this not show? Like possible use an if function?

    My approach was this:
    Please Login or Register  to view this content.
    but it doesn't work.
    Last edited by hokeyplyr48; 03-31-2008 at 02:47 PM.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Excel counts each day as one, so 1/0/1900 is the date equivalent of 0. You can suppress 0s in Options (depending on the sheet, this may not be recommended if you do want to show some 0s), use conditional formatting to make 0s appear the same color as your background (making them invisible), or use =IF('2008 Apartment Comps (INPUT)'!AC27="","",'2008 Apartment Comps (INPUT)'!AC27)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Dates in Excel are days counted from Jan 0, 1900 (31 Dec 1899), so zero formatted as a date looks like that.

  4. #4
    Registered User
    Join Date
    03-31-2008
    Posts
    28
    Quote Originally Posted by darkyam
    Excel counts each day as one, so 1/0/1900 is the date equivalent of 0. You can suppress 0s in Options (depending on the sheet, this may not be recommended if you do want to show some 0s), use conditional formatting to make 0s appear the same color as your background (making them invisible), or use =IF('2008 Apartment Comps (INPUT)'!AC27="","",'2008 Apartment Comps (INPUT)'!AC27)
    could you possible describe the syntax and arguments for your code? i presume that the "","" part means empty?

  5. #5
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Yes, "" outputs a blank cell. The IF function takes 3 arguments, a logical test, a value to return if true, and a value to return if false. The first argument calls the value in AC27 and compares it to "". If it is blank, it returns a blank to the cell in which the formula resides. If it is not blank, it returns the value of AC27.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Were you / are you a Hokey?

  7. #7
    Registered User
    Join Date
    03-31-2008
    Posts
    28
    thanks, that seems to have worked perfectly.

    one more quick question though. If i reference a cell with multiple lines of text in another worksheet using this method (or any that i've tried) it converts it all to one line. is there a way to keep the text in lines? like to keep the returns there?

    EDIT: no sorry it's the name i use for everything. it's my aim sn and hockeyplyr48 was taken. i'm too lazy/not creative enough to think of a new sn/online tag

  8. #8
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Not that I'm aware of, especially not without VB script (which I'm unfortunately not good enough to provide). Excel does not do well with break characters (tabs, returns, etc.) within cells.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Quote Originally Posted by hp48
    is there a way to keep the text in lines? like to keep the returns there?
    The line feeds are there; just format the cell in which the formula appears to wrap text.
    Quote Originally Posted by darkyam
    ... especially not without VB script
    VBScript is a scripting language used (mostly, I think) in Internet Explorer; VBA is Excel's automation language.

  10. #10
    Registered User
    Join Date
    03-31-2008
    Posts
    28
    Quote Originally Posted by shg
    The line feeds are there; just format the cell in which the formula appears to wrap text.
    You mean just shrink the cell so the text wraps? If so it won't work like that because these are addresses. It deletes the return/space between the first and second line so that it becomes one word. For example, Myhouse4893 Main StreetRaleigh, NC 99999. It would break it all up incorrectly.

    If that's not what you meant could you explain?

  11. #11
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    VBScript is a scripting language used (mostly, I think) in Internet Explorer; VBA is Excel's automation language.
    I was referring to a script written in VB, which I have heard used almost interchangeably with VBA when talking about macros in Microsoft applications. However, point taken; I will try to be a little more precise in the future to avoid confusion.

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe we've gotten disconnected.

    Enter

    Myhouse
    4893 Main Street
    Raleigh, NC 99999


    all in cell A1, with the line feeds entered using Alt+Enter.

    In B1, enter =A1, and format B1 to wrap text. If you make column B wide enough, you'll see the line breaks in the same position.

    My point was, the formula does not delete the line feeds.

  13. #13
    Registered User
    Join Date
    03-31-2008
    Posts
    28
    ahh i see what you're saying. that fixed my problem. Thank you everyone for helping me, I greatly appreciate it!

+ 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