Skip navigation

How to use a chain in a formula ?

287 Views 7 Replies Latest reply: Feb 19, 2013 3:05 PM by Somolian RSS
Somolian Level 1 Level 1 (0 points)
Currently Being Moderated
Feb 19, 2013 12:38 PM

Hello, I want to make a calculation using values from another cell but it gives the error "expected number but found chain".

 

content of B2: 5*2*3

content of B3: =B2

 

How can I make it compute B2 ?

iMac, Mac OS X (10.6.8)
  • Jerrold Green1 Level 7 Level 7 (28,215 points)
    Currently Being Moderated
    Feb 19, 2013 1:11 PM (in response to Somolian)

    I'm a bit suspicious that this may not be a question about Numbers. Chain is not term that I've ever seen used with respect to Numbers.

     

    Could you tell us more about what you are trying to calculate?

     

    Jerry

  • Jerrold Green1 Level 7 Level 7 (28,215 points)
    Currently Being Moderated
    Feb 19, 2013 1:46 PM (in response to Somolian)

    OK then, it would be a good idea to expand your calculation:

     

    You could do this:

     

    Screen Shot 2013-02-19 at 4.44.44 pm.png

     

    Jerry

  • Jerrold Green1 Level 7 Level 7 (28,215 points)
    Currently Being Moderated
    Feb 19, 2013 1:53 PM (in response to Somolian)

    You could write: =5*2*3 in any cell.

     

    Jerry

  • Badunit Level 6 Level 6 (10,765 points)
    Currently Being Moderated
    Feb 19, 2013 2:42 PM (in response to Somolian)

    You are trying to convert a string that looks like a formula (contained in cell B2) and have the result of the formula  be calculated in cell B3, right?

     

    Two ideas:

     

    Idea 1: If you format B2 as text then enter the text =5*2*3 then change the cell format to Automatic, it will do the calculation in cell B2. You can convert it back to text to see the formula again.

     

    Idea 2: Use an Applescript. The Applescript would copy the string from B2, put the "=" at the beginning and put it into B3. B3 will calculate the result. You can design the script to do this for multiple sets of cells. An example is below for you to try out. If you like it we can make it so it can be started with a keyboard command. Not quite sure how we'll stop it with a keyboard command, though

     

    1. Open the Applescript Editor application
    2. Copy the entire script from below
    3. Paste it into Applescript Editor
    4. Open a new Numbers document
    5. Put a formula into cell B2
    6. Run the script
    7. When you are done testing it out, stop the script. Otherwise it will run forever.

     

    tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1

              set vold to ""

              repeat

                        set vnew to ("=" & value of cell "B2")

                        if voldvnew then

                                  set value of cell "b3" to vnew

                                  set vold to vnew

                        end if

              end repeat

    end tell


Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.