Closed Thread
Results 1 to 4 of 4

Search for 2 true arguments and return true or false

  1. #1
    David
    Guest

    Search for 2 true arguments and return true or false

    I'm sure that what I'm after is easy - anyway here is the problem: -

    I have 4 rows which contain values and a separate column which shows a
    corresponding value for the number of months. If there are values in the 4
    rows then there should be a corresponding value in the months column, so if
    it shows zero there is an error in the spreadsheet. Because there are loads
    of rows this would be a good check to validate the data in the spreadsheet.

    Conditional formatting could be an option, although I'm not sure how to do
    it or I was thinking of a function like the one below (but one that works): -

    If there are values in columns A through to D and column E is 0 then show
    ERROR otherwise show OK.

    Hopefully the above clearly explains what I'm trying to achieve.

    Thanks


    --
    David

  2. #2
    Max
    Guest

    Re: Search for 2 true arguments and return true or false

    > If there are values in columns A through to D and column E is 0 then show
    > ERROR otherwise show OK.


    Perhaps in F2, copied down:
    =IF(AND(COUNTBLANK(A2:D2)=0,E2=0),"Error","OK")
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "David" wrote:
    > I'm sure that what I'm after is easy - anyway here is the problem: -
    >
    > I have 4 rows which contain values and a separate column which shows a
    > corresponding value for the number of months. If there are values in the 4
    > rows then there should be a corresponding value in the months column, so if
    > it shows zero there is an error in the spreadsheet. Because there are loads
    > of rows this would be a good check to validate the data in the spreadsheet.
    >
    > Conditional formatting could be an option, although I'm not sure how to do
    > it or I was thinking of a function like the one below (but one that works): -
    >
    > If there are values in columns A through to D and column E is 0 then show
    > ERROR otherwise show OK.
    >
    > Hopefully the above clearly explains what I'm trying to achieve.
    >
    > Thanks
    >
    >
    > --
    > David


  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475
    try this adjust to your needs

    =IF(COUNTBLANK(A1:E1),"Error",NOW())

    now() shows todays date, you can change it to what ever you require

  4. #4
    Max
    Guest

    Re: Search for 2 true arguments and return true or false

    > Perhaps in F2, copied down:
    > =IF(AND(COUNTBLANK(A2:D2)=0,E2=0),"Error","OK")


    Better to make it in F2 as:
    =IF(AND(COUNTBLANK(A2:D2)=0,E2=0, E2<>""),"Error","OK")

    (added test: E2<>"")
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---

Closed 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