+ Reply to Thread
Results 1 to 6 of 6

Date in column header won't work in formula

  1. #1
    Registered User
    Join Date
    01-27-2015
    Location
    houston, texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Date in column header won't work in formula

    I've built an amortization table and have dates as column headers.
    1/1/2019, 2/1/2019, 3/1/2019,...

    In another table I have Start Date and End Date columns. I've built a formula that essentially says, =IF(AND(1/1/2019 is > Start Date, 1/1/2019 < End Date),"TRUE", "")

    So if it's between the start and end date I want a "TRUE" result.

    This formula works fine when I have my data in just a range. (as you'll see in the file).
    The second I turned that range into a table the formula gave me a false reading (because the dates in the column headers are now acting as TEXT and not DATES, despite me changing the format to date).

    How can I fix this or workaround it?

    See file attachment.
    Attached Files Attached Files
    Last edited by canefan17; 10-20-2019 at 03:39 AM.

  2. #2
    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,981

    Re: Date in column header won't work in formula

    Will you please attach a small sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    Instructions (Please Read Carefully):

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment (it hasn't worked for years, and despite our repeatedly asking the technical team who own the forum to fix it, they can't be bothered to do so), so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  3. #3
    Registered User
    Join Date
    01-27-2015
    Location
    houston, texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Date in column header won't work in formula

    I have attached my file.

    You will see the 2 amortization tables on the right.

    1 is just a range of data (and gives me the correct results), and 1 is a table (which gives me blanks despite it being the same formula.

    I suspect the table isn't working because the headers are dates, and Excel apparently auto-formats them to text (which means the IF formula isn't effective anymore).

    How can I get those date headers back into date format? I've tried many things to no avail.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Date in column header won't work in formula

    Please Login or Register  to view this content.
    Edit:
    H$28*1 also works
    Last edited by protonLeah; 10-19-2019 at 10:09 PM.
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    01-27-2015
    Location
    houston, texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Date in column header won't work in formula

    Thanks. I ultimately decided to just put a row above the table with the dates, and then hide the row.

  6. #6
    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,981

    Re: Date in column header won't work in formula

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] Deleting column based on Column header date less than today
    By daryl83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2017, 02:44 PM
  2. Replies: 7
    Last Post: 04-01-2016, 03:27 PM
  3. [SOLVED] how to make my one row macro work on the entire column, also have header on row 1
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-28-2016, 12:19 PM
  4. Replies: 2
    Last Post: 03-03-2014, 10:56 AM
  5. Combine multiple columns into one column with header and date in another column
    By JJadams in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2012, 05:30 PM
  6. Finding a column value based on date and column header
    By soready42012 in forum Excel General
    Replies: 0
    Last Post: 01-18-2012, 06:21 PM
  7. Replies: 2
    Last Post: 04-10-2006, 03:40 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