Forum Discussion

MartaSM's avatar
MartaSM
Copper Contributor
Jun 03, 2021
Solved

Insertar nombre archivo en una celda

Hola!

Necesito traducir esta fórmula al español y no me sale:

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)

 

Gracias!!

3 Replies

  • mtarler's avatar
    mtarler
    Silver Contributor
    the CELL function can return various information and in this case it is returning the "filename". But the "filename" is actually a full path to that cell in this format: Absolute_file_path[filename]sheetname So the MID function will take a string (the above full path) and return just the middle part based on a starting position (the 1st SEARCH finds the location of the "[") and a length (the 2nd search for "]" minus the 3rd search for the "[" again) So it will return the MID part of the full path that is between the "[" and "]" characters, which is the actual filename. Hope that helps
    • MartaSM's avatar
      MartaSM
      Copper Contributor
      La parte de la función la entiendo, pero no da el resultado, me sale como que es volátil y no da resultado.

Resources