on 01-25-2011 10:52 PM
Dear All,
We are trying to do some calculations in this way:
1. I get the information from the DB by a input schedule (EVDRE)
2. On the data retieved I have to make some modification
3. I would like to use VBA macro to do this changes
question :
If the colum H24 contains the data I would like to multiply by 30 and save in a macro variable TOTAL
how should the VBA code look like ?
Thanks in advance for your help
FedeX
Hi
I would like to multiply the value of a cell by *30
I would like to control the referencing to the cells by using i and j
something like this
n= 3
m = 5
i from 1 to n
j from 1 to m
cell(i,j) = cell(i,j)*30
Thanks
FedeX
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank for answer and hints,
I will open regarding the same task in a logic script.
one additional question regarding this scenario.. if I am navigationg the input schedule with to variable i and j
how should be the instruction to replace the
Range("H24") ?
Thanks
FedeX
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi FedeX
Your VBA macro should look like this:
sub calculation()
dim total as integer
total = Range("H24").value * 30
end sub
However, I would advise to create the calculations inside either script logic or use normal excel calculations, have you considered those first?
With kind regards,
Tim Vierhout
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fedex,
Have you thought about using script logic for the above scenario?
Cheers,
Karthik AJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.