Feb 12, 2021

IMPORTHTML incorrectly formatting as dates

I am using the 'IMPORTHTML' function in a sheet. But one of the results of the array of which is imported is formatted as '0/00'. Google Sheets thinks that this is a date, while I do not want it to be a date, as it messes with other functions such as 'VLOOKUP'. For example, if one of the cells in the array is 5/25, Google Sheets assumes this is '5/25/2021'. Also, if I change the format to "Plain Text", it results with "44341". I have tried multiple things such as changing the formatting before using 'IMPORTHTML', but I have found no solutions to this specific problem. Mainly, I want Sheets to not assume 'IMPORTHTML' values as dates.
Locked
Informational notification.
This question is locked and replying has been disabled.
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Feb 13, 2021
Hi Peter,
 
I am afraid that there is no easy way to make importhtml() stop converting values that look like dates.
 
One possible workaround is to format the problematic column as m/dd, as that would make the result look like what you want. You can then use trim() In your vlookup() to convert the column back to text strings to let the matching work — assuming that your search keys are text strings as well.
 
If you need more help, please share a sample spreadsheet that shows realistic-looking sample data and your hand-entered expected results from that data.
 
Cheers --Hyde
Original Poster Peter Chavez marked this as an answer
Helpful?
All Replies (2)
Recommended Answer
Feb 13, 2021
Hi Peter,
 
I am afraid that there is no easy way to make importhtml() stop converting values that look like dates.
 
One possible workaround is to format the problematic column as m/dd, as that would make the result look like what you want. You can then use trim() In your vlookup() to convert the column back to text strings to let the matching work — assuming that your search keys are text strings as well.
 
If you need more help, please share a sample spreadsheet that shows realistic-looking sample data and your hand-entered expected results from that data.
 
Cheers --Hyde
Original Poster Peter Chavez marked this as an answer
Feb 13, 2021
Thanks, I figured a different way around but it is nice to know that it's not possible. Thanks, again.
false
6364367555934838946
true
Search Help Center
true
true
true
true
true
35
false
false
Search
Clear search
Close search
Main menu