Forum Discussion
wjallen14
Nov 20, 2019Brass Contributor
if statement working with dates
I am trying to write an if statement where I have one sheet 2019 and the next sheet 2020 but I keep getting a value error. the following is the formula that I am using: =IF(TEXT(DATE(INT((Dec!H1-1)/1...
- Nov 21, 2019
If in H1 of Dec sheet you have 01 Dec, 2019 and in H1 of Jan sheet you'd like to have 01 Jan 2010 that could be like
=EDATE(Dec!H1,1)
Similar for other sheets.
SergeiBaklan
Nov 20, 2019Diamond Contributor
Yes, formula is not correct, it looks like
=IF("some text", some date, "NO")
Condition shall return Boolean value.
Could you please clarify what is in H1 and what you'd like to receive.
- wjallen14Nov 21, 2019Brass Contributor
SergeiBaklan 12/1/2019 is Dec HI
- SergeiBaklanNov 21, 2019Diamond Contributor
If in H1 of Dec sheet you have 01 Dec, 2019 and in H1 of Jan sheet you'd like to have 01 Jan 2010 that could be like
=EDATE(Dec!H1,1)
Similar for other sheets.
- wjallen14Nov 21, 2019Brass Contributor
works exactly what we wanted thank you SergeiBaklan