Home > Blockchain >  Formula produces numbers that can't be calculated
Formula produces numbers that can't be calculated

Time:01-26

I have a formula, that extracts a number from a cell (like bla bla Pris: xxx.00):

MID(A3:A2000,FIND("Pris: ",A3:A2000) 6,FIND(".00",A3:A2000)-FIND("Pris: ",A3:A2000)-6)

The result is correctly xxx

But xxx can't be calculated on in other cells.

CodePudding user response:

You can use the VALUE() function to convert a string into a number.

So it will look like

=VALUE( MID(A3:A2000,FIND("Pris: ",A3:A2000) 6,FIND(".00",A3:A2000)-FIND("Pris: ",A3:A2000)-6) )

CodePudding user response:

try:

=INDEX(MID(A3:A2000, FIND("Pris: ",A3:A2000) 6, 
                     FIND(".00",   A3:A2000)- 
                     FIND("Pris: ",A3:A2000)-6)*1)

or just:

=INDEX(REGEXEXTRACT(A3:A, "Pris: (\d )\.")*1)
  •  Tags:  
  • Related