Forum Discussion

TommyMossberg's avatar
3 years ago

Randomly getting "DataFormat.Error: Ogiltigt cellvärde: #VALUE!." on files with same template.

Hi

I have a bunch of Excel-files made with the same template. I use the following formula in cell H8:

 

=SEQUENCE(1, XLOOKUP(EXTRACT(CELL("filename", A1), FIND("]", CELL("filename", A1), 1)+1, 255), Months[Month], Months[Sequence]), XLOOKUP(EXTRACT(CELL("filename", A1), FIND("]", CELL("filename", A1), 1)+1, 255), Months[Month], Months[Start]), 1)

 

In short it finds the name of the sheet and translate it into a Date. Then the sequence populates a calendar in the format YYYY-MM-DD where the length depends on what month it is.
This works perfectley fine but when I try to combine each sheet from multiple files in Power Query I get a random Error (DataFormat.Error: Ogiltigt cellvärde: #VALUE!.) in cell H8 and null in cell I8, J8 (and so on) instead of the numeric value of the date created with the formula above. This applies to about 1/10 of the files. 9/10 works perfectly fine!

Overview

Working

The files are from the same template and I can't figure out why this is happening. 

Anyone has any suggestions of where to start?

1 Reply