Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Associating messages with random numbers?
Hi all
I am a new user of Excel, i'm looking for a bit of help with the following. I am using Excels RAND formula to mimic a die roll for a game i play, however associated with each die roll number i would like a message to be displayed giving instructions to the player, for example =RANDBETWEEN(1,10) IF(1) message A IF(2) message B . . .IF(10) message J I am ok generating the Random number, but how do i associate a message to each value and display the message instead of the value? Any help appreciated, like i said i am new to Excel so may need to walk me through it. Thanks for any replies regards slipper |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Associating messages with random numbers?
Hi,Am Sat, 3 May 2014 21:21:50 +0100 schrieb slipper: I am using Excels RAND formula to mimic a die roll for a game i play, however associated with each die roll number i would like a message to be displayed giving instructions to the player, for example =RANDBETWEEN(1,10) IF(1) message A IF(2) message B your RAND formula in A1. Then: =CHOOSE(A1,"MessageA","MessageB","MessageC","Messa geD","MessageE",.........) Or you write the numbers from 1 to 10 e.g. in L1:L10 and in M1:M10 the depending messages. Then you can try it with: =VLOOKUP(A1,$L$1:$M$10,2,0) Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#3
|
|||
|
|||
Quote:
Claus Thanks alot mate, that works perfectly really appreciate it. Out of interest is there a way to assign a colour to the cell depending on what message shows? for example something like your RAND formula in A1. Then: =CHOOSE(A1,"MessageA (CELL green)","MessageB (CELL blue)","MessageC (CELL red)","MessageD (CELL yellow)","MessageE (CELL orange)",.........) not that important but would be nice to do. Thanks again for your help really appreciate it. regards slipper |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Associating messages with random numbers?
Hi,
Am Sun, 4 May 2014 11:32:09 +0100 schrieb slipper: Out of interest is there a way to assign a colour to the cell depending on what message shows? for example something like your RAND formula in A1. Then: =CHOOSE(A1,"MessageA (CELL green)","MessageB (CELL blue)","MessageC (CELL red)","MessageD (CELL yellow)","MessageE (CELL orange)",.........) look for Conditional Formatting Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Associating messages with random numbers?
Hi,
Am Sun, 4 May 2014 12:52:16 +0200 schrieb Claus Busch: look for Conditional Formatting or look he https://onedrive.live.com/?cid=9378A...121822A3%21326 for "ShowDependingMessages" There is a solution with macro. Rightlick and download the file because macros are disabled in OneDrive Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#6
|
|||
|
|||
Quote:
cheers mate slipper |
#7
|
|||
|
|||
Quote:
One more thing i thought of that may be usefull to me. The conditional formatting works fine for changing a colour of a cell based on a value in that cell. However is there any way to influence the colour of another cell based on the value in a separate cell? for example your RAND formula in A1. Then: =CHOOSE(A1,"MessageA","MessageB","MessageC","Messa geD","MessageE",.........) IF(A1 <= 4) then (A2&&A3 = green, A4 = red) IF(A1 4) then (A2 = green, A3 = red, A4 = orange) The above is not exactly what i want just as way of an explanation, is this possible at all? can't see a way of doing it with conditional formatting, only of changing the colour in the cell with the value in it. Cheers again for any help. regards slipper |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Associating messages with random numbers?
Hi,
Am Mon, 5 May 2014 11:01:05 +0100 schrieb slipper: IF(A1 <= 4) then (A2&&A3 = green, A4 = red) IF(A1 4) then (A2 = green, A3 = red, A4 = orange) The above is not exactly what i want just as way of an explanation, is this possible at all? can't see a way of doing it with conditional formatting, only of changing the colour in the cell with the value in it. look again in OneDrive for the workbook. I changed the code to the above colors. Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#9
|
|||
|
|||
Quote:
Thanks for all your help, took the opportunity to download some other example aswell. regards slipper |
#10
Posted to microsoft.public.excel.misc
|
|||
|
|||
Associating messages with random numbers?
Hi,
Am Tue, 6 May 2014 10:12:04 +0100 schrieb slipper: Think i am sorted now. always glad to help. Thank you for your feedback Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Random messages pop up | Excel Worksheet Functions | |||
getting numbers divisible by 4 from random numbers in ascending order | Excel Worksheet Functions | |||
Can Excel pick random numbers from 1-300 and not repeat numbers? | Excel Discussion (Misc queries) | |||
Non-random numbers generated by excel's data analysis random gener | Excel Worksheet Functions | |||
Non-random numbers generated by excel's data analysis random gener | Excel Discussion (Misc queries) |