ArchiveUser
8 years agoQrew Captain
Compare 2 dates and output a specific word in a third field
I have a simple nested IF statement that works correctly in Excel, but in translating it to QB, it fails.
Excel Formula:
=IF([Date Received] < $E$3, "GW", IF([Date Received] < $E$4, "INVERTER", "GOOD"))
The above formula looks at a date field and compares it against 2 fixed date fields and outputs GW or INVERTER if before the fixed date, otherwise it says GOOD.
In QB I just did a single if statement to test:
If([Date Received] < [Recloser Date], "GW", "GOOD")
This always defaults to GOOD no matter whether the [Date Received] is before or after the [Recloser Date]. The source fields are Date fields and the calculation field is a Formula-Text field due to the output being text. But I did try a Formula-Date and QB threw an error.
Any help is appreciated on this seemingly easy issue.
Thanks!
Excel Formula:
=IF([Date Received] < $E$3, "GW", IF([Date Received] < $E$4, "INVERTER", "GOOD"))
The above formula looks at a date field and compares it against 2 fixed date fields and outputs GW or INVERTER if before the fixed date, otherwise it says GOOD.
In QB I just did a single if statement to test:
If([Date Received] < [Recloser Date], "GW", "GOOD")
This always defaults to GOOD no matter whether the [Date Received] is before or after the [Recloser Date]. The source fields are Date fields and the calculation field is a Formula-Text field due to the output being text. But I did try a Formula-Date and QB threw an error.
Any help is appreciated on this seemingly easy issue.
Thanks!