Forum Discussion
Need a Macro for the following steps.
Hello All,
Please see attachments. I just revised the attached Excel sheet.
I’d like a macro to do the following:
- If for a given Mark in column A of “Addl Composite Stage Loads” tab, the value in the corresponding cell “C row #” in “Addl Composite Stage Loads” is zero or blank, then skip steps 2 and 3 ( below), and go to the next Mark, and if there is a value in “C row #” greater than zero then run all the steps 2 and 3.
- The value in cell “G6” in “Addl Composite Stage Loads” tab will be incremented from 0.1,0.2,0.3,….,0.9.
- The result in cell “B4” in “CJ Design” tab will be copied and place in the corresponding cell in
C4 thru K4.
So
if the increment value is 0.1 it will be placed in C4
if the increment value is 0.2 it will be placed in D4
if the increment value is 0.3 it will be placed in E4
and so on.
Repeat the above steps for the next joist Marks
Thank you,Sam
3 Replies
- Yea_SoBronze Contributor
There's a missing link to your explanation. The increment, how will the vba code know what to base the increment is on?
for example:J1 If Addl Composite Stage Loads!C11 is Blank, then (Do Nothing) else Addl Composite Stage Loads!C11 x Addl Composite Stage Loads!G6
so then after J1 condition has been met the result will be put in CJ Design!C4
Then the vba code is going to increment Composite Stage Loads!G6 based on what condition?
I can assume that if the calculation is based on J2 then the increment would be .02 but i'm not a framer so I wouldn't know.
- SamFaresBrass Contributor
Hello Yea_So
Each increment is 0.1. So you are incrementing up from 0.1 to 0.9. There is no basis to the size of the increment. I can choose a different increment. Did i answer your question? If for example C11 is blank just set the increment value to 0.5 for that mark. Then go to the next mark. Thanks!- Yea_SoBronze Contributor
Hi SamFares
That question just had to be asked for the benefit of the vba macro coder to clarify that the macro does not need a parameter input but is based on the value of the increment cell. Unfortunately although I understand vba macro, it is not my forte but to help you ask your question for the coder.
cheers