#Invalid Data Type Error for years in rank
Trying to figure out what broke in a formula. Will you get this error if the cell is blank? For instance trying to figure out years in rank for a certain role in this example how many years from Assistant Professor to Professor
Answers
-
Could you check the type of the columns you used in the formula.
And could you please add a sample data with the result of the formula manually to help me to design the exact formula for you.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
@Bassam Khalil absolutely & thank you for your help! The columns are set up with the Date Field:
Additionally the formula is: =YEAR([Assistant Professor]@row) - YEAR(Instructor@row)
I guess I was thinking if the cell is empty because they never held that rank the formula would default to "0" instead?
Thanks,
Liz
-
Please try the following formula:
=IFERROR(IF(OR(ISBLANK([Assistant Professor]@row), ISBLANK(Instructor@row)), "", YEAR([Assistant Professor]@row) - YEAR(Instructor@row)), "")
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
@Bassam Khalil thank you! Do I need to select the select the columns or copy/paste into the cell should work? I copy/pasted into the cell but the cell is now blank. I'm sure Im doing something wrong.
-
@Bassam Khalil sorry we are confused as the formula we previously had of: =YEAR([Associate Professor]@row) - YEAR([Assistant Professor]@row) seems to be working for some cells but not all- something must have broke along the way. See Screenshot:
-
My formula solve the problem of blank cells that cause "invalid data type" error but you need to use the same column name or you select your column name and modify my formula to match.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!