MS Excel cheatsheet

By xngo on August 31, 2019


# Concatenate strings
="Hello" & "World"
# Convert date and time as string
=TEXT(NOW(), "yyyy-mm-dd hh:mm:ss")


# Display the current filename with its full path and the name of the current worksheet.
# If you don't include a cell reference(i.e A1), 
#     CELL("filename") gives you the path to the last workbook/worksheet changed.
=CELL("filename", A1)    # Output: C:\xuan\[excel.xlsx]Fruits
# Display filename only. Output: excel.xlsx
=MID(   CELL("filename", A1),
        SEARCH("[",CELL("filename", A1))+1,
        SEARCH("]",CELL("filename", A1))-SEARCH("[",CELL("filename", A1))-1

About the author

Xuan Ngo is the founder of He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.