Skip to content
Advertisement

How can I make a: for i in range work with a float [closed]

So I was working on this project but I ran stuck (again), I have a excel file with 344 columns and he should check if a cell has a certain and if it has then it should continue and print a word. If it doesnt then it should also continue but then without printing. I believe that I have the right code but it still returns an error.

JavaScript

This is the code, and it returns this error:

JavaScript

If I’m right it returns this because the value in the cell is a float. How can I make this work with a float?

Advertisement

Answer

You already was iterating over FrictionNumber with i, so you could just directly use the value i for comparing.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement