Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Hiding rows (Excel 2003)

    Good afternoon.....I am looking for some help fine-tuning a formula (that I had help with in this forum a few months ago) in the attached sample worksheet. The formula in column A will place a period (.) in column A, depending on the CODE in column F....I have a macro in the worksheet that will hide any row without a period in column A..for example, it would hide row 5. If you look at the formula in column A, you'll see that it identifies a bunch of codes (TLT, STO etc etc) that should be hidden. I want to also hide any row containing P-Time in column F.....everything worked nicely before I added the "P-Time" code to the mix, but now it doesn't.....I suspect that it has something to do with either (a) having data in column C,or, ( having data in column I............any suggestions as to how to rewrite this formula so as to not have a period in column A when column F shows P-Time.....thank you.

    EDIT: I have worked up this formula for column A since posting...any comments: =IF(AND(OR(C4="",AND(C4>0,F4="P-TIME")),OR(IF(ISERROR(F4),TRUE,OR(F4="P-Time",F4="TLT",F4="sto",F4="stm",F4="tho",F4="dto" )),I4=0)),"",".")
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hiding rows (Excel 2003)

    Could you explain in words under what conditions you want to place a period in column A?

  3. #3
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Hiding rows (Excel 2003)

    Hi Hans.....there is a period in column A by default; I want to remove the period from any row in column A when:

    (a) "P-Time" or "TLT" appear in column F, no matter what the value is in that row in column I, and,
    ( STO, STM, THO, or DTO appear in column F and the value in that same row = 0 (hours)

    The formula worked nicely originally, and then when I added the P-Time aspect, it didn't work......the formula below seems to do the trick
    =IF(AND(OR(C4="",AND(C4>0,F4="P-TIME")),OR(IF(ISERROR(F4),TRUE,OR(F4="P-Time",F4="TLT",F4="sto",F4="stm",F4="tho",F4="dto" )),I4=0)),"",".") but I wondered if there were something a bit more elegant? Thank you.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hiding rows (Excel 2003)

    This version is a bit shorter:
    <code>
    =IF(OR(F4="P-TIME", F4="TLT", AND(OR(F4="DTO", F4="STM", F4="STO", F4="THO"), I4=0)), "", ".")
    </code>
    Or this:
    <code>
    =IF((F4="P-TIME")+(F4="TLT")+((F4="DTO")+(F4="STM")+(F4="STO" )+(F4="THO"))*(I4=0), "", ".")</code>

  5. #5
    4 Star Lounger
    Join Date
    Oct 2005
    Posts
    599
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Hiding rows (Excel 2003)

    Thank you, again, for your help with this Hans....I am trying both and they seem to be working (in the sample w/book) but I'll know better once I apply them to the real-life book.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •