HollyLouise
New Member
- Joined
- Feb 7, 2013
- Messages
- 3
Hello All,
Bit of background; I am trying to automate an excel sheet which produces a report. Where if something is true, it will return a statement from the statements sheet. If not, it will be blank. However, I do not want it to be too automated (as then it will lose its personal touch) and thus, I have added the random function for numbers 1-5 (in formula below exists in cell G2) and then written the same sentences in various different ways to add a human touch and the randomised function will chose a sentence from the statements sheet at random and thus each report will be slightly different.
So the nitty gritty, I have created a userform with 3 option boxes, two with yes or no answers, where for example, if the person selects option box 1, then it will follow an "if" formula which is "=IF(G2=1, Statements!B3, IF(G2=2, Statements!B4, IF(G2=3,Statements!B6, IF(G2=4, Statements!B5, IF(G2=5, Statements!B7, "")))))"
N.B.statement is another sheet and I want the information placed into the current sheet in cell G4 (which has the button which links to the userform). If the person selects no, then the cell is left blank.
I want the same to be for the other boxes, with the one with three options, "severe", "mild", "none", where severe and mild will produce an If formula similar to the above, and none will return a blank cell.
Lastly there is a tick box, which each tick box will again follow a similar IF formula, where if it is ticked, then it will produce a statement from Statements sheet, and if not, then blank.
Finally, I have a button on the userform called create report, where, once the person has selected the various options and tick boxes, it will run the report, where all the above will be completed and filled in.
So I need a code to do the above. Do I select the boxes to add code or the individual yes or no tick boxes?
I know this is probably totally basic, but I am extremely new to this, and I need to complete this soon, I hope someone can explain/help me!
Thank you ever so much.
Bit of background; I am trying to automate an excel sheet which produces a report. Where if something is true, it will return a statement from the statements sheet. If not, it will be blank. However, I do not want it to be too automated (as then it will lose its personal touch) and thus, I have added the random function for numbers 1-5 (in formula below exists in cell G2) and then written the same sentences in various different ways to add a human touch and the randomised function will chose a sentence from the statements sheet at random and thus each report will be slightly different.
So the nitty gritty, I have created a userform with 3 option boxes, two with yes or no answers, where for example, if the person selects option box 1, then it will follow an "if" formula which is "=IF(G2=1, Statements!B3, IF(G2=2, Statements!B4, IF(G2=3,Statements!B6, IF(G2=4, Statements!B5, IF(G2=5, Statements!B7, "")))))"
N.B.statement is another sheet and I want the information placed into the current sheet in cell G4 (which has the button which links to the userform). If the person selects no, then the cell is left blank.
I want the same to be for the other boxes, with the one with three options, "severe", "mild", "none", where severe and mild will produce an If formula similar to the above, and none will return a blank cell.
Lastly there is a tick box, which each tick box will again follow a similar IF formula, where if it is ticked, then it will produce a statement from Statements sheet, and if not, then blank.
Finally, I have a button on the userform called create report, where, once the person has selected the various options and tick boxes, it will run the report, where all the above will be completed and filled in.
So I need a code to do the above. Do I select the boxes to add code or the individual yes or no tick boxes?
I know this is probably totally basic, but I am extremely new to this, and I need to complete this soon, I hope someone can explain/help me!
Thank you ever so much.