Need a Macro for the following steps.

%3CLINGO-SUB%20id%3D%22lingo-sub-2352516%22%20slang%3D%22en-US%22%3ENeed%20a%20Macro%20for%20the%20following%20steps.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2352516%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3EPlease%20see%20attachments.%20I%20just%20revised%20the%20attached%20Excel%20sheet.%3C%2FP%3E%3CP%3EI%E2%80%99d%20like%20a%20macro%20to%20do%20the%20following%3A%3C%2FP%3E%3COL%3E%3CLI%3EIf%20for%20a%20given%20Mark%20%26nbsp%3Bin%20column%20A%20of%20%E2%80%9CAddl%20Composite%20Stage%20Loads%E2%80%9D%20tab%2C%20the%20value%20in%20%26nbsp%3Bthe%20corresponding%20cell%20%E2%80%9CC%20row%20%23%E2%80%9D%20in%20%E2%80%9CAddl%20Composite%20Stage%20Loads%E2%80%9D%20is%20zero%20or%20blank%2C%20then%20skip%20steps%202%20and%203%20(%20below)%2C%20and%20go%20to%20the%20next%20%26nbsp%3BMark%2C%20and%20if%20there%20is%20a%20value%20in%20%E2%80%9CC%20row%20%23%E2%80%9D%20%26nbsp%3Bgreater%20than%20zero%20then%20run%20%26nbsp%3Ball%20the%20steps%202%20and%203.%3C%2FLI%3E%3CLI%3EThe%20value%20in%20cell%20%E2%80%9CG6%E2%80%9D%20in%20%E2%80%9CAddl%20Composite%20Stage%20Loads%E2%80%9D%20tab%20will%20be%20incremented%20from%200.1%2C0.2%2C0.3%2C%E2%80%A6.%2C0.9.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SamFares_0-1620932622310.png%22%20style%3D%22width%3A%20113px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F280581iE547665AA40E0709%2Fimage-dimensions%2F113x99%3Fv%3Dv2%22%20width%3D%22113%22%20height%3D%2299%22%20role%3D%22button%22%20title%3D%22SamFares_0-1620932622310.png%22%20alt%3D%22SamFares_0-1620932622310.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EThe%20result%20in%20cell%20%E2%80%9CB4%E2%80%9D%20%26nbsp%3Bin%20%E2%80%9CCJ%20Design%E2%80%9D%20tab%20will%20be%20copied%20and%20place%20in%20the%20corresponding%20cell%20in%3CP%3EC4%20thru%20K4.%3C%2FP%3E%3CP%3ESo%3C%2FP%3E%3CP%3Eif%20the%20increment%20value%20is%200.1%20it%20will%20be%20placed%20in%20C4%3C%2FP%3E%3CP%3Eif%20the%20increment%20value%20is%200.2%20it%20will%20be%20placed%20in%20D4%3C%2FP%3E%3CP%3Eif%20the%20increment%20value%20is%200.3%20it%20will%20be%20placed%20in%20E4%3C%2FP%3E%3CP%3Eand%20so%20on.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%26nbsp%3BRepeat%20the%20above%20steps%20for%20the%20next%20joist%20Marks%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%2CSam%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2352516%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2353313%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20a%20Macro%20for%20the%20following%20steps.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2353313%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F351459%22%20target%3D%22_blank%22%3E%40SamFares%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere's%20a%20missing%20link%20to%20your%20explanation.%20The%20increment%2C%20how%20will%20the%20vba%20code%20know%20what%20to%20base%20the%20increment%20is%20on%3F%3CBR%20%2F%3Efor%20example%3A%3C%2FP%3E%3CP%3EJ1%20If%26nbsp%3BAddl%20Composite%20Stage%20Loads!C11%20is%20Blank%2C%20then%20(Do%20Nothing)%20else%26nbsp%3BAddl%20Composite%20Stage%20Loads!C11%20x%26nbsp%3BAddl%20Composite%20Stage%20Loads!G6%3C%2FP%3E%3CP%3Eso%20then%20after%20J1%20condition%20has%20been%20met%20the%20result%20will%20be%20put%20in%26nbsp%3B%3CSPAN%3ECJ%20Design!C4%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThen%20the%20vba%20code%20is%20going%20to%20increment%26nbsp%3BComposite%20Stage%20Loads!G6%20based%20on%20what%20condition%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20can%20assume%20that%20if%20the%20calculation%20is%20based%20on%20J2%20then%20the%20increment%20would%20be%20.02%20but%20i'm%20not%20a%20framer%20so%20I%20wouldn't%20know.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2361139%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20a%20Macro%20for%20the%20following%20steps.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361139%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1047584%22%20target%3D%22_blank%22%3E%40Yea_So%3C%2FA%3E%3CBR%20%2F%3EEach%20increment%20is%200.1.%20So%20you%20are%20incrementing%20up%20from%200.1%20to%200.9.%20There%20is%20no%20basis%20to%20the%20size%20of%20the%20increment.%20I%20can%20choose%20a%20different%20increment.%20Did%20i%20answer%20your%20question%3F%20If%20for%20example%20C11%20is%20blank%20just%20set%20the%20increment%20value%20to%200.5%20for%20that%20mark.%20Then%20go%20to%20the%20next%20mark.%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello All,

Please see attachments. I just revised the attached Excel sheet.

I’d like a macro to do the following:

  1. 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.
  2. The value in cell “G6” in “Addl Composite Stage Loads” tab will be incremented from 0.1,0.2,0.3,….,0.9.SamFares_0-1620932622310.png
  3. 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.

  4.  Repeat the above steps for the next joist Marks

    Thank you,Sam

3 Replies

@SamFares 

 

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.

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!

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