[Solved]Trying to move the results of a RAND function
[Solved]Trying to move the results of a RAND function
I have a formula for creating a random number in a cell. Now i would like to execute the formula each time so when it calculates the random number i can have it show up in a stand alone cell. The reason i want to do this is because each time i calculate it or execute the command i will see a different number between 1 and 30. I then want to be able to create a new command such as IF that will say, "if g 25 = 24, "Double" or "if g25 = 7, "Ground out" Any help is greatly appreciated. Thanks
Last edited by Brevardo on Tue Jul 23, 2019 3:18 am, edited 1 time in total.
Open Office 3.1
Re: Trying to move the results of a RAND function from the c
You can not COPY a value by a FORMULA. A formula will REFERENCE the value.Now i would like to execute the formula each time so when it calculates the random number i can have it show up in a stand alone cell.
Copy it manually or write a macro for this task.
I then want to be able to create a new command such as IF that will say, "if g 25 = 24, "Double" or "if g25 = 7, "Ground out"
Code: Select all
=IF(G25=24;"Double";"")
Code: Select all
=IF(G25=7;"Ground out";"")
Code: Select all
=IF(G25=24;"Double";IF(G25=7;"Ground out";""))
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Trying to move the results of a RAND function from the c
Okay. This is good info. If i do the nested example you provided, can i have 4 or 5 "If" commands? The only thing that confused me was the parentheses. How many would I need to have in the formula if say I use 5 "If" commands? Thanks
Open Office 3.1
Re: Trying to move the results of a RAND function from the c
Yes you can. See the Help.If i do the nested example you provided, can i have 4 or 5 "If" commands?
Code: Select all
=IF(The Condition;Output when it is True;Output when it is False)
But it is better to use a helper table and the function VLOOKUP() instead of the nested IF() - when you want to use more than 3-4 conditions for same input parameter.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Trying to move the results of a RAND function from the c
Okay. That makes sense. Let me go ahead and try that and Ill keep you posted. Thanks again
Open Office 3.1
Re: Trying to move the results of a RAND function from the c
If you have a lot of conditions that you want to have specific messages for, then using a table and the VLOOKUP function, as I now see Tibor already suggested.
The table option would also allow quick changes, additions and deletions if the messages and/or number of messages changed.
The table option would also allow quick changes, additions and deletions if the messages and/or number of messages changed.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
- MrProgrammer
- Moderator
- Posts: 4907
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Trying to move the results of a RAND function from the c
[Tutorial] VLOOKUP questions and answersBrevardo wrote:I then want to be able to create a new command such as IF that will say, "if g 25 = 24, "Double" or "if g25 = 7, "Ground out"
If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
[Tutorial] Ten concepts that every Calc user should knowBrevardo wrote:Any help is greatly appreciated.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).