can someone plz help me out to write a macro for the format below:
= 43.29+67.86
= 111.15+67.86
= 179.01+67.86.... same operation to be done in the other columns with different values. it would be a grt help!!!
can someone plz help me out to write a macro for the format below:
= 43.29+67.86
= 111.15+67.86
= 179.01+67.86.... same operation to be done in the other columns with different values. it would be a grt help!!!
What exactly is the macro supposed to look at and what is it supposed to do?
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
step 1: it should add up 43.29+67.86. which is = 111.15.
step 2: with 111.15 it should add 67.86. so, 111.15+67.86=179.01
step 3 again with 179.01, 67.86 is to be added. so, 179.01+67.86=246.87......
for next column 53.61+46.24=99.85
=146.09+46.24
=192.33+46.24.... for other columns different values are there.
My dearest writwika,
We cannot look over your shoulder and see the workbook you have in front of you.
"step 1: it should add up 43.29+67.86. which is = 111.15."
Okay, but pray tell, where are we to find these numbers to add? We cannot be a great help if you do not express from wherein the values are to be found...
I see that it is your first thread. Welcome to the forum, vbax is great! We just need you to 'draw' a clearer 'picture' of what you are wanting to do. For instance, "I want to add all numerical values in column A, and plunk the return in cell n. Then the same thing for columns B through n.", would give us a clue as to the goal...
Mark
a random variable is taken. to this we add 11.47. again, we add 11.47 to the result. this process goes on 5500 times. 11.47 is fixed. please help me out. please do say if u have a doubt still.
No wonder we didn't understand. 11.47 was pretending to be 67.86. Can't say it is fully explained yet, but here is one attempt
=A1*11.47*5500
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
67.86 is to be added to a random variable in the 1st cell. now from the next row i want to keep on adding 67.86 to the previous result. this goes on 5500 times. it will look like:
let us take the random variable as 11.47.
= 11.47+67.86
= 79.33+67.86
=147.19+67.86... now can u get a picture of it???
So can we assume that you mean that cell A1 + 67.86, and fill down for 5500 rows?.. now can u get a picture of it???
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
To what purpose ??
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
So, he's back ?
Nah, he means that some random number in a cell gets multiplied by 67.86, then multiplied by 67.86, then gets ... 5500 times. But he doesn't say whether that random number is input by someone/something, whether he wants the code to generate it, what the bounds of that random number are, whether he wants that number multiplied by 67.86 5500 times whenever that random number appears, whether he wants a button for the user to press every time, or what. Despite asking for clarification the OP only seems to be able to regurgitate - sounds that this may be homework.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
the random variable we select should be any number less than 100 and user does NOT input it. the cell no changes in every step. A1+67.86. then A2+67.86. A3+67.86....this goes on 5500 times automatically. so the execution should stop at A5500.
@ writwika, why didn't you say so initially as this would have cleared up the confusion surrounding this thread
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
plz provide the macro for it. it is urgent.
If it's urgent hire a software specialist.
Sub ken() Range("A1").Value = Application.MRound(Rnd() * 99.99, 0.01) Range("A2:A5500").Formula = "=A1+67.86" Range("A2:A5500").NumberFormat = "0.00" End Sub
thanks for the reply but the code is not working. showing runtimme error.
Most likely you are running a version older than 2010. Replace the mround function with this one.
When it errors, you can use Debug to see where it errored. You can also step through code by pressing F8 to debug line by line.Sub ken() Range("A1").Value = Round(Rnd() * 99.99, 2) Range("A2:A5500").Formula = "=A1+67.86" Range("A2:A5500").NumberFormat = "0.00" End Sub