+ Reply to Thread
Results 1 to 14 of 14

Slight problem with stuff not disappearing when it should...

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Slight problem with stuff not disappearing when it should...

    If I have to post examples, I will, but I'm going to try and keep this minimal :

    =E3&IF(I3=0,"",", "&I3&"% of cross sectional area")&IF(AND(G3>0,H3=0),", at "&G3&" o'clock","")&IF(AND(G3>0,H3>0),", from "&G3&" to "&H3&" o'clock","")&IF(J3>0,", "&J3&"""","")

    Is returning, as an example,

    Water Level, 30% of cross sectional area, from to o'clock

    The 'from to o'clock' is from the third &IF, G3>0,H3>0. The problem is, both those cells are empty, and I want it to just return nothing. It should just be

    Water Level, 30% of cross sectional area

    I can't seem to get the from to o'clock to go away.

  2. #2
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    I see why, but it leaves me stuck. The reason is because I need it to return the values from those columns, and it's reading the formulas. How do I prevent it from reading the formulas, and just the values?

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Are there formulas in G3 and H3?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    Yep. As I said, I realize that's why I'm getting a problem... I'm just not sure what to do about it. I need those formulas there, but I need the value to be ignored if the cell is empty, and be treated as nothing so that I don't get text that shouldn't be there.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Instead of testing for >0 try testing for <>"".

  6. #6
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    That didn't seem to fix it.... and now that I realized that's my problem, it's made the initial problem much worse. Now the same line looks like:

    Water Level, 30% of cross sectional area, at o'clock, from to o'clock,"

    A completely empty, where G, H, I, and J are ALL empty now looks like this:

    Manhole, % of cross sectional area, at o'clock, from to o'clock, "

    Hrm. This is dumb. You'd think there'd be a simple thing to tell Excel to just look at the value of the cell and ignore formulas.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Excel doesn't look at the formulas, it only looks at the value in the cell whether it's the result of a formula or manually entered.

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  8. #8
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    The Detail tab is the one with familiar information. The C column is what I'm trying to fix.

    Wincan 7 Detail Help.xlsx

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Does this do what you want?
    Formula: copy to clipboard

    =E2&IF(I2=0,"",", "&I2&"% of cross sectional area")&IF(AND(G2<>0,H2=""),", at "&G2&" o'clock","")&IF(AND(G2<>"",H2<>""),", from "&G2&" to "&H2&" o'clock","")&IF(J2<>"",", "&J2&"""","")

  10. #10
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    Getting closer, I think... I'm still getting 'at O'clock' on the Manholes, when there shouldn't be anything.

    And still getting Cross-Sectional area, as well. I column needs its formula dragged down.

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Perhaps.

    Formula: copy to clipboard
    =E2&IF(I2="","",", "&I2&"% of cross sectional area")&IF(AND(G2<>"",H2=""),", at "&G2&" o'clock","")&IF(AND(G2<>"",H2<>""),", from "&G2&" to "&H2&" o'clock","")&IF(J2<>"",", "&J2&"""","")

  12. #12
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    That did it! I'll have to look at what you did sometime - I'm still trying to learn. But that fixed it. Thank you very much, Norie!

  13. #13
    Forum Contributor
    Join Date
    03-13-2014
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2013
    Posts
    125

    Re: Slight problem with stuff not disappearing when it should...

    I swear, one of the most difficult things about building this converter is getting stuff NOT to appear when it shouldn't.

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Slight problem with stuff not disappearing when it should...

    Basically I replaced all the 0s with "" as that was what the formulas in the columns E, G, H etc. were returning.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Slight problem with Arrays Formula
    By helpbitte in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-12-2013, 10:14 AM
  2. Slight problem
    By Glenn Kilpatric in forum Excel General
    Replies: 3
    Last Post: 10-22-2006, 05:57 AM
  3. Slight problem - routine to add quotes to a column
    By throat.wobbler.mangrove@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-2005, 11:05 AM
  4. [SOLVED] Slight Problem
    By Nick in forum Excel General
    Replies: 1
    Last Post: 06-29-2005, 11:54 AM
  5. Slight problem automating Excel in a service
    By someone in forum Excel General
    Replies: 2
    Last Post: 05-13-2005, 05:06 PM

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