+ Reply to Thread
Results 1 to 33 of 33

Conditional Function not Producing Results

  1. #1
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Conditional Function not Producing Results

    Hello,
    Do you guys see a problem with this function:
    =IF(AND(G15=4/25/2020,A16="S&B"),G16,"")
    It is not producing the value of G16 even though the conditions are met and G16 has a value of 24
    Thanks

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    4 divided by 25 divided by 2020
    try
    =IF(AND(G15=datevalue("4/25/2020"),A16="S&B"),G16,"")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Thank you, but it produced this value:
    1/24/1900
    And that is not what is supposed to show. It is supposed to show the value of G16 which is currently 24

  4. #4
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    the 4/25/2020 is a date

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    load a sample file
    I'm in UK so dates will be different

    G15 is a DATE ? and NOT text and it is 25th April 2020
    Format G15 -to general - does it stay as a date or change to a number

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    it produced this value:
    1/24/1900 And that is not what is supposed to show. It is supposed to show the value of G16 which is currently 24
    1/24/1900 is how Excel will display the number 24 as a date. It looks like Excel is returning 24 just as you expect, but the cell is formatted as date. Change the cell's number formatting to something more appropriate.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Lightbulb Re: Conditional Function not Producing Results

    Done by changing the format of the cell. Thanks guys

  8. #8
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Can I do this having the conditions in one sheet and the target cell on another sheet of the same workbook?

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    you are welcome

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    yes
    use sheetname!
    or
    'sheet name'!

    then cell - whats on a different sheet

  11. #11
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Thank you.
    Another question:
    Can I formulate G4 to contain the next calendar day off of the date range mentioned in the period row of this screenshot?
    Attachment 676061

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    cant see the attachment & dont understand the question, sorry

  13. #13
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Yes, the attachment is crucial to understand the question.
    Here is a word attachment.Doc1.docx

    The question is if I could formulate G4 to obtain the date after the range of row 3.
    Thanks again,

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    why a word doc and not the spreadsheet excel itself ?????
    I dont have to re-create then
    Also what results you expect

  15. #15
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    I see. Here is the excel file.
    Attachment 676161
    I have not done anything about this particular question. I was just wondering if I could automatically fill G4 with the date after the range stated on row 3. Right now, I have manually assigned G4 that date that I want, but I would like to be automatically off of the date range mentioned.
    Thanks

  16. #16
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Conditional Function not Producing Results

    the attachment does not work -
    See the instructions in the yellow banner top of screen

    you need to explain a bit more

    g4 has a date in of 25th
    next in period, what period - why is this 25th based on the info in the sheet?

  17. #17
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    Short but useless answer -- yes, you can formulate G4 to be the date after the end of a date range.

    B3 contains a text string representing the date range. The process would then be:
    1) Extract the ending date string (using RIGHT() and maybe a FIND()/SEARCH())
    2) Convert the resulting text string to a date serial number (another DATEVALUE() like etaf used in post #2)
    3) Then add 1 to it.

    I hate dealing with text strings like this. Unless I was told that life, liberty, or national security required us to use only B3 for the date range, I would:
    1) Enter the starting date (as a date) in B3
    2) Enter the ending date (as a date) in C3
    3) G4 then becomes a a simple =C3+1

  18. #18
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    That's a great solution. Thanks.

  19. #19
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Can you also suggest a way of keeping the values of the "graph" sheet based on date value given on the "Therapist" sheet. Right now, it is assigning the correct value to each cell given the conditions of the formulas, but I would like to keep values given prior to the date specified.
    For example, in the attachment, you only see a value under 4/11/2020 of the graph sheet as formulated, which is correct, but I would like to maintain the values of the 4/4, 3/28, etc. etc which I had entered in the therapist sheet the weeks prior.
    Thanks,
    Jose

  20. #20
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Attachment 676753
    Here is the attachment, I am sorry

  21. #21
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    Attachment failed to attach correctly.

  22. #22
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Good morning,
    Did you try to attach a file? Your last thread is showing a failure in that regard...
    Thanks again,
    Jose

  23. #23
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    Nope I did not try to attach a file, I was observing that I could not view your attachment in post 20.

  24. #24
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Attachment 676910
    Here is the attachment I intended to show you. Please let me know if you are able to see it this time

  25. #25
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    Still says invalid attachment.

  26. #26
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,471

    Re: Conditional Function not Producing Results

    Jose - follow the instructions in the yellow box at the top of the page to upload your workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  27. #27
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    Thank you.
    Please try it now.
    Thanks again
    Attached Files Attached Files

  28. #28
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    I think it will depend on exactly how you are intending to use this workbook. I could see suggesting anything from a manual copy -> paste as values kind of thing (if interact with this sheet rarely) to something that involves redesigning the workbook into a better data base type format (if you need to interact with this sheet frequently). The advantage of copy/paste as values is that you retain all of the "thinking" in your head and the spreadsheet doesn't need to do any of the thinking. The advantage of a good database is that you can then access pivot tables, filters, and many other useful utilities for summarizing and charting the data. It all depends on how you are intending to use this workbook.

  29. #29
    Registered User
    Join Date
    05-04-2020
    Location
    Miami Florida
    MS-Off Ver
    Office 365
    Posts
    15

    Re: Conditional Function not Producing Results

    There will be constant interaction so a better database must be a better solution...

  30. #30
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    I don't do database work, so I don't think I can be much help to you. Some of our regulars are pretty good with databases in Excel, though, and should be able to help design a workable database. Until then, some basic ideas to review:
    https://www.excelforum.com/access-ta...ml#post5315969
    https://www.excelforum.com/tips-and-...for-excel.html
    a couple of links to external pages: https://www.excelforum.com/excel-new...ml#post4906705

    I also expect those who come to help will want to know more about how you want to interact with the workbook, what data you need to store, what you will need to do with the data, etc.

  31. #31
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Conditional Function not Producing Results

    deleted -- wrong thread.

  32. #32
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Conditional Function not Producing Results

    If you are considering a database, I would suggest using MS Access. Here is a white paper on how to design and normalize your data.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  33. #33
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Function not Producing Results

    @josedorkis

    29 post just to make clear what you want to achieve.

    I hope you follow the forumrules from now on.


    First advice, don't work with merged cells you get in trouble with it sooner or later.


    Add all data in a verticaly way, like I show you in the sheet Oeldere.

    In this case I used VBA code for that.

    After that you can use a pivot table to analyse the data.

    After that it is also possible to create a graph.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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] VBA producing unexpected results
    By trandle in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-20-2017, 09:43 AM
  2. [SOLVED] Conditional format formula producing incorrect results?
    By Dougie12. in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-20-2014, 03:02 PM
  3. IF and AND statement producing varied results
    By md1972 in forum Excel General
    Replies: 7
    Last Post: 02-25-2010, 11:48 AM
  4. [SOLVED] formulas producing unjustified results
    By Query in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-11-2006, 06:50 AM
  5. Conditional formatting producing inconsistant results?
    By Craig Sink in forum Excel General
    Replies: 3
    Last Post: 08-16-2005, 11:05 AM
  6. FORECAST function isnt producing wanted results
    By lsu-i-like in forum Excel General
    Replies: 4
    Last Post: 08-04-2005, 04:05 PM
  7. [SOLVED] Help With Producing Results Please
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-18-2005, 01: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