# Need help with Fuctions or a formula, don't know which [solved]

I am trying to do a Function or formula or something, not even sure what I need to be doing or how to do it. It is for some hypothetical situations. What I am wanting to do is to have a column of random numbers, then 2 columns of numbers in percentage based off of the random number in the cell on that same row. So say Column A for the list of random numbers, Column B and Column C for the profits by percentage. The hypothetical numbers need to look real for the situation though. Like this :

```
random numbers deal profit trade profit
0.5924370951212 59.24% 592.44%
0.986644999118732 98.66% 986.64%
0.69899366207306 69.90% 698.99%
0.29986947345673 29.99% 299.87%
0.175831086796236 17.58% 175.83%
```

As you can see, some of the numbers in the 2nd column would be OK for a business trade or a stock trade. All of the numbers in column 2 would even be fairly realistic for a stock trade if you got very lucky on some trades. The numbers in column 3 would not be realistic for business transactions (unless you were a bank maybe? ) but some of them might look realistic for a stock trade, those trades like google or apple when you catch the stock way down or got in on the ground floor and held on.

I can go through the whole spreadsheet doing formulas one at a time and make it look realistic, but it is very tedious if you have like 100 or more random numbers you want to make realistic. So, I tried to do a formula in the first cell of Column B and Column C, and then drag & fill below so that they would process the numbers on each row of Column A. I tried nested IF Functions, even tried nested IF & AND Functions, trying to get results that would look realistic as hypothetical numbers.

But I couldn't make it work. The only way I could think of to do it was to have a separate IF Function for each range : like if it is .01 to .1 do this, if it is .11 to .2 do this, and so on up to if it is .91 to .99 do this. I could get it to work using an IF Function for A1<=.3, then like nested IF for A1>.3, etc. But I don't know how to specify from .11 to .2 in a Function. I tried like if(A1=.11:.2,(A1*1),0) but that did not work, got an error code.

Does anyone know how I might set this thing up so that I can use nested IF Functions and specify a range like .11 to .2? I was thinking nested IF's like (A1>=.1 do this, A1>=.2, A1>=.3, etc) would not work because if the number was like .3 then it would meet the requirements of ...

You need to simply use

elseclauses to make that work:So each second option ("else") would

onlyexecute if the previous condition is not met.Same question asked at OpenOffice forum

My apologies for posting on both forums looking for the answer, I should have given them more time here to respond to the question. I was not aware the same people checked both boards, which is nice of everyone to do helping on both boards.. Thought this board was not very active since I had seen a number of questions posted for some time with no answers. Quite embarrassing, again my apologies.

I tried that example, and I did not get any error messages from doing it that way. But the answer was given as 0.00% so I must have done something wrong.

That only means that you need to provide a sample spreadsheet with formulas, and comments where and what is expected...

Just FYI, functions are e.g. SUM, AVERAGE, IF, VLOOKUP and a formula is a combination of one or more of functions.