seothtt 1 Posted January 9, 2013 Report Share Posted January 9, 2013 I'm scraping two numbers from a website, putting each number into a table using "set table cell". The third cell I want to be the percentage, so cell 2/cell 1. When I try doing divide "table cell 2" / "table cell 1" I get "cannot divide two strings". So I took the two numbers and used "set" to make them variables. Then tried using "set table cell" doing divide "variable 2" / "variable 1", yet I still get "cannot divide two strings". So then I tried using "Set" to create a third variable, with both the divide using table cell and divide using variables, and I still get "cannot divide two strings". So, if I have two numbers, how do I get a percentage, how do I divide the two numbers? Thanks,Richard Quote Link to post Share on other sites
seothtt 1 Posted January 9, 2013 Author Report Share Posted January 9, 2013 Sorry, found the answer by searching. Thanks. Quote Link to post Share on other sites
nicolai 4 Posted May 7, 2017 Report Share Posted May 7, 2017 Sorry, found the answer by searching. Thanks.and the answer is? I am trying to simply divide two numbers and its driving mental trying to look for answer. I can see its possible to add numbers. multiple numbers. Subtract numbers. but divide number? Is a mystery. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted May 7, 2017 Report Share Posted May 7, 2017 why is divide a mystery? it is the same as the rest. in most fields just put4/2so use the/to divide.Regards,Nick 1 Quote Link to post Share on other sites
nicolai 4 Posted May 8, 2017 Report Share Posted May 8, 2017 why is divide a mystery? it is the same as the rest. in most fields just put4/2so use the/to divide. Regards,Nick I am using code view. EG: set(#this_file_size_mb,$eval($divide(#file_size,1024)),"Global") This does not seem to work even when #file_size is a numeric value. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 8, 2017 Report Share Posted May 8, 2017 I am using code view. EG: set(#this_file_size_mb,$eval($divide(#file_size,1024)),"Global") This does not seem to work even when #file_size is a numeric value. Works fine for me and you don't even need the eval in that case: set(#file_size,55548,"Global") set(#this_file_size_mb,$divide(#file_size,1024),"Global") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.