Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IF any of the statments are true then (excel 2003)

    Hello,
    I am having trouble with a rather large IF statment
    =IF(car1="Ford",B127:B131=1,IF(car2="Ford",B127:B1 31=1,IF(car3="Ford",B127:B131=1,IF(car4="Ford",B12 7:B131,IF(car5="Ford",1,IF(Car6="Ford",1,B127:B131 =""))))))

    basically it looks through a range car1 to car6 and if anyone has the value Ford it places 1 in a range.

    can an if statment accomplish this?

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    You can not modify the value in one cell from a formula in a different cell. You will either need to use VBA code to accomplish this (and we would need to know more about exactly what you are trying to do to help with that), or put a fromula like the one below in each of the cells in the range B127:B131.

    <code>
    =IF(OR(car1="Ford",car2="Ford",car3="Ford",car4="F ord",car5="Ford",car6="Ford"),"1","")
    </code>
    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    Which way would be more reliable, faster ??

  4. #4
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    basically I am using an autofilter on a column to hide and show rows. so when I autofilter non-blanks the column row with a 12 show and row blank are hidden

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    Using the formulas would be faster, as long as they do what you want.
    Legare Coleman

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    I am not sure I understand what you are trying to accomplish. From your description, and the IF statement in your first post, it looks like cells B127:B131 are always going to be the same. either they will all be 1, or they will all be blank. I am not sure what this accomplishes with autofilter.

    In any event, if I have any understanding of what you want, using VBA will require putting code into the worksheet change event routine to check the car# cells and set the B127:B131 cells. I think the formulas are the best and fastest way to go.
    Legare Coleman

  7. #7
    2 Star Lounger
    Join Date
    May 2005
    Location
    Wilcox, Saskatchewan
    Posts
    171
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IF any of the statments are true then (excel 2003)

    10-4

Posting Permissions

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