Forum Discussion
Error in the logical test section of the IF function
It seems like there might be an issue with the comparison of the dates in your IF statement. When working with dates in Excel, it's crucial to ensure that the dates are in the correct format and that there are no hidden characters or discrepancies.
Let's break down the components:
- Calendar Date Formula:
={1,2,3,4,5,6,7} - WEEKDAY(DATE($B$2,$C$2,1),1) + DATE($B$2,$C$2,1)
This formula generates a list of dates based on the input year and month. Make sure that the result is in a valid date format.
- Annual Ledger Table Date Formula:
=DATE(VALUE([@년]), VALUE([@월]), VALUE([@일]))
This formula should also result in a valid date.
- IF Statement:
=IF(C5=연차대장[날짜종합], 연차대장[텍스트],"")
Here, you are comparing the date in cell C5 with the date in the "날짜종합" column of the "연차대장" table. Ensure that both dates are in the same format and there are no hidden characters.
Here are a few troubleshooting steps:
- Date Format Consistency: Confirm that both date columns have the same date format. You mentioned that the "날짜종합" column is formatted as *2012-03-14. Ensure that the dates from the calendar formula are also in this format.
- Data Types: Make sure that the data types of the date columns match. If there are discrepancies, you may need to convert one of them to match the other.
- Hidden Characters: Sometimes, there might be hidden characters in the cells. You can use the CLEAN function to remove non-printable characters.
=CLEAN(C5)
After checking these aspects, if the issue persists, you may want to consider providing more details about the data or sharing a sample of the spreadsheet for further assistance. The text, steps and functions were created with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.
Thank you for answering my question.
I check all aspects you mentioned. But, the issue isn't fixed.
I upload my excel file.
I'll appreciate if you could check this.
Bless you
- NikolinoDEFeb 01, 2024Platinum ContributorExcuse me, but after trying with the file, I see that my Excel is getting confused with the characters and at the same time I can't decipher each of these characters.
Please forgive me if I can't be of more help here.
Maybe someone who follows this message can say and know more about it.
Thank you for your time, patience and understanding.- muhun2Feb 05, 2024Copper ContributorOh It's my mistake I didn't change characters into English.
Thank you for your reply.
Have a nice day.