Hello,
First, I must say english is not my native language so please ignore any misspell or badly constructed phrases.
Also I'm pretty new with VBA and macros. I checked some of the sites posted in the first sticky thread and learned some things, but many specific doubts still remain.
1) When I say "How to re-use macro?", what I mean is: - imagine I do a macro in an excel file, and I want to give that excel file to different people. It´s supposed to those people write on the first sheet of the excel file and then run the macro, and after they do that somewhere in a row appear some values wich are useful to them. But if they are not happy with what they get, they want to put different values on the first sheet, and do this as many times as they want. Is this doable? Because when you run the macro you can´t "Ctrl+z".
2) For the next question I have to explain moreless the problem I have in hands. Basically I have a row of values (an estimation) that after a lot of math gives me another row of values. This second row has to be inserted in the place of the first, like a loop. I'm doing this with copy paste, that I learned how to code recording a macro. Now the problem is to do the "stop", that involves some comparison statements. If you could give me some link with that kind of information, I only know it's probably with Do.. Until, but I dont know how to write this code
3) Finally, I want to copy something but only the values. It's something like .PasteSpecial, right? Can you show me where to get more info on this matter?
P.S.
Question 2) code in Matlab so you can see what I have to read to learn how to do it in VBA:
for n1 = 1:500
eq. a
eq. b
eq. c
etc..
alpha=0.44;
old=T;
new=Tf;
current=alpha*new+(1-alpha)*old;
if and((atuais > velhos),(atuais-velhos < 0.001))
break
elseif and((atuais < velhos),(velhos-atuais < 0.001))
break
elseif (atuais == velhos)
break
end
T=atuais;
end
Bookmarks