Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Go Go is offline
external usenet poster
 
Posts: 6
Default using mathmatical symbols in cells

I am trying to re-create a brain teaser from the newspaper on an excel spread
sheet. The aim is to have two rows and two columns of numbers interlaced and
the four mathmatical symbols used once each so that both the rows and columns
sum to the same amount.

e.g. (this is not solved!)

2 10
6 / 2 - 2
2 2
3 + 2 * 2
1 1

I would like to put mathmatical symbols in cells to form each equation, so
that I can change the symbol and both row and coloumn up-dates. Has anyone
done something like this?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default using mathmatical symbols in cells

Consider the following User Defined Function:

Function equa(r1 As Range, r2 As Range, r3 As Range) As Variant
v1 = r1.Value
v2 = r2.Value
v3 = r3.Value
equa = Evaluate(v1 & v2 & v3)
End Function

So if A1 contains 1
and B1 contains +
and C1 contains 2

then =equa(A1,B1,C1) will return 3

You can change the symbol in B1 to - or / or * or ^


User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=equa(A1,B1,C1)

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200823


"GO" wrote:

I am trying to re-create a brain teaser from the newspaper on an excel spread
sheet. The aim is to have two rows and two columns of numbers interlaced and
the four mathmatical symbols used once each so that both the rows and columns
sum to the same amount.

e.g. (this is not solved!)

2 10
6 / 2 - 2
2 2
3 + 2 * 2
1 1

I would like to put mathmatical symbols in cells to form each equation, so
that I can change the symbol and both row and coloumn up-dates. Has anyone
done something like this?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default using mathmatical symbols in cells


Hi. I pulled up all "permutations" of "+-*/" and even "+-*/^" and did
not show a solution. Are you sure you copied the problem correctly?
- - -
Dana DeLouis


GO wrote:
I am trying to re-create a brain teaser from the newspaper on an excel spread
sheet. The aim is to have two rows and two columns of numbers interlaced and
the four mathmatical symbols used once each so that both the rows and columns
sum to the same amount.

e.g. (this is not solved!)

2 10
6 / 2 - 2
2 2
3 + 2 * 2
1 1

I would like to put mathmatical symbols in cells to form each equation, so
that I can change the symbol and both row and coloumn up-dates. Has anyone
done something like this?

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default using mathmatical symbols in cells

On Jan 2, 9:13*am, Dana DeLouis wrote:
Hi. *I pulled up all "permutations" of "+-*/" and even "+-*/^" and did
not show a solution. *Are you sure you copied the problem correctly?
- - -
Dana DeLouis


Are you sure, Dana? Left to right, then top to bottom: +/*-
=4
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default using mathmatical symbols in cells

Hi. Thanks. Maybe I don't understand the question.
I take it one replaces all of the + - * / that are listed with different
permutations.

{"2+2-1", "10*2/1", "6+2*2", "3-2/2"},
{"2+2-1", "10/2*1", "6+2/2", "3-2*2"},
{"2+2*1", "10-2/1", "6+2-2", "3*2/2"},
{"2+2*1", "10/2-1", "6+2/2", "3*2-2"}...
....etc

I didn't show any that were all equal numerically.
Even if duplicates were allowed, I didn't get an answer.
I'll try some more ideas.
Thanks. :)



Spiky wrote:
On Jan 2, 9:13 am, Dana DeLouis wrote:
Hi. I pulled up all "permutations" of "+-*/" and even "+-*/^" and did
not show a solution. Are you sure you copied the problem correctly?
- - -
Dana DeLouis


Are you sure, Dana? Left to right, then top to bottom: +/*-
=4



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default using mathmatical symbols in cells

On Jan 2, 10:24*am, Dana DeLouis wrote:
Hi. Thanks. *Maybe I don't understand the question.


{"2+2*1", "10/2-1", "6+2/2", "3*2-2"}...


Maybe you should check this one again. Note this always goes in order
since it is a little brain teaser game, it doesn't follow the "*/
before +-" rule of algebra.
:-)
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default using mathmatical symbols in cells

Oh! I see. The rows can total to a different value than the columns.
I thought both rows and columns had to total to the same value. My mistake.

{"2+2+1", "10/2*1", "6+2/2", "3+2*2"},
{"2+2+1", "10/2^1", "6+2/2", "3+2^2"},
{"2+2^1", "10/2-1", "6+2/2", "3^2-2"}

ect...
Dana DeLouis


<snip

Spiky wrote:
On Jan 2, 9:13 am, Dana DeLouis wrote:
Hi. I pulled up all "permutations" of "+-*/" and even "+-*/^" and did
not show a solution. Are you sure you copied the problem correctly?
- - -
Dana DeLouis


Are you sure, Dana? Left to right, then top to bottom: +/*-
=4

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default using mathmatical symbols in cells

On Jan 2, 10:42*am, Dana DeLouis wrote:
Oh! *I see. *The rows can total to a different value than the columns..
I thought both rows and columns had to total to the same value. *My mistake.


No, you had the premise correct, according to the OP's description.
Maybe you just missed a calc somewhere. As I said, the correct signs
a

+ /
* -

2+2*1=4
10/2-1=4
6+2/2=4
3*2-2=4
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mathmatical functions in Excel MAC JUNIOR Excel Worksheet Functions 4 September 23rd 08 03:58 PM
Symbols inside cells Jedi_Wcu4 Excel Discussion (Misc queries) 2 January 17th 06 12:18 AM
symbols in cells Oni Excel Discussion (Misc queries) 2 April 25th 05 11:09 AM
mathmatical error CRatt Excel Worksheet Functions 2 February 16th 05 03:44 AM
How to set up a graph for mathmatical graphing mike71366 Setting up and Configuration of Excel 0 December 10th 04 03:09 PM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"