Results 1 to 2 of 2

Thread: Automate Math worksheet in LibreOffice Calc

  1. #1
    Join Date
    Sep 2005
    Beans
    1,596
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Automate Math worksheet in LibreOffice Calc

    Does anyone know how I could do the following in LibreOffice Calc:

    Cell A2 contains the value: 2+3
    Cell A3 should contain the student/users answer, in this case: 5
    Cell A4 gives a red X for wrong or a green check for correct

    Without having it process =2+3 how can I have LibreOffice Calc convert a string 2+3 to process it like =2+3 ?

    If I have to do it manually that's ok, I thought I could automate it.
    MBA M1 - M1 8GB 256GB - macOS Monterey
    MSI GL65 - i5-10300H 16GB 512GB GTX 1650 Windows 11
    Galaxy Book Go - Snapdragon 7c Gen 2 4GB 128GB Windows 11

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Automate Math worksheet in LibreOffice Calc

    You could do it the other way around, I think i.e.

    - create a cell to evaluate the answer =2+3

    - use the FORMULA() function to return the text formula (literally =2+3) into A2

    You can trim the = off the front e.g. with the MID string function i.e. if A1 contains your actual =2+3 formula, then

    =MID(FORMULA(A1),2,LEN(FORMULA(A1)))

    inserts literal string 2+3

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •