+ Reply to Thread
Results 1 to 4 of 4

Help with IF & AND Functions

Hybrid View

  1. #1
    Registered User
    Join Date
    10-10-2018
    Location
    NSW Australia
    MS-Off Ver
    2018
    Posts
    2

    Help with IF & AND Functions

    Hello,

    Im having trouble with this code, If i select multiple cells ('All Leaks'!E3:E1368) it doesn't work.


    #=IF(AND('All Leaks'!E3:E1368="Meter",'All Leaks'!B871=Rates!Q337+0),1,0)#

    It works when i select only a single cell ('All Leaks'!E871) but not if i have multiple cells selected

    #=IF(AND('All Leaks'!E871="Meter",'All Leaks'!B871=Rates!Q337+0),1,0)#

    This code's purpose is for a running total from a list, i have considered i might encounter issues relating to
    more than one variable with the same output. If that was the case would i just use a sum function at
    the end like this and plus one onto the original output cell?


    #=IF(AND('All Leaks'!E3:E1368="Meter",'All Leaks'!B871=Rates!Q337+0),SUM(E377+1),0)#

    This might be confusing but I'm really stuck, and this is my best attempt at explaining my situation,
    Thank You.

    (EDIT)

    or to put it very simply


    #=IF(E871:E873="Meter Tap",1,0)#

    when i select multiple cells on an if function it doesn't work.
    Last edited by Jordon; 10-10-2018 at 07:50 PM. Reason: Make is easier

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Help with IF & AND Functions

    AND can't be used with arrays, but there are other ways to achieve that.

    Please explain what you are trying to do, and we might be able to come up with something that works for you.

    Why are you adding zero to Rates"Q337 ? Is it because that cell contains a number stored as a text value?

    Pete

  3. #3
    Registered User
    Join Date
    10-10-2018
    Location
    NSW Australia
    MS-Off Ver
    2018
    Posts
    2

    Re: Help with IF & AND Functions

    Thank you for your reply,

    Can IF Function work with arrays?

    Help2.png

    So i have a list of jobs and i wish to put them in a table (IMG Below)
    like this which matches the job type for example Main, Meter, Service
    and also puts it in the correct cell under the date
    i am adding zero to Rates"Q337 because its a date,
    when i tried using the DATEVALUE function for some reason it did not work

    so Rates"Q337 is a date cell.


    Help.PNG
    Last edited by Jordon; 10-10-2018 at 08:24 PM.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,840

    Re: Help with IF & AND Functions

    Hello Jordan and Welcome to Excel Forum.
    It looks as if you are trying to count types of jobs done on a specific date which might be something that you could do using COUNTIFS. I don't understand why the orange cells have text dates as opposed to actual dates, that would make things easier. I am guessing that the orange row is 337 so, as the dates are sequential just place the date 1/10/18 in cell Q337, press Ctrl + Enter, and drag the fill handle over to cell V337.
    A possible formula might be:
    Formula: copy to clipboard
    =COUNTIFS('All Leaks'!$E$3:$E$1368,$P338,'All Leaks'!$B$3:$B$1368,Q$337)

    If this doesn't work, I suggest uploading a SMALL desensitized/fictionalized version of the input data as well as manually mocked up output based on that data.
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Replies: 7
    Last Post: 08-18-2017, 11:53 AM
  2. Replies: 9
    Last Post: 06-13-2017, 01:41 PM
  3. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. Replies: 0
    Last Post: 11-15-2007, 05:24 AM
  6. Replies: 2
    Last Post: 07-13-2006, 11:30 PM
  7. [SOLVED] Conversion from Spreadsheet Toolkit functions (ESSV....) to EssBase API functions
    By sujay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2006, 05:20 AM

Tags for this Thread

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