aperez1981
MIS
I have the following code for a msgbox
Msg = "The summary measures for product " & Product & " in " & _
Region & " are:" & vbCrLf & vbCrLf
If CountOpt Then Msg = Msg & "Count: " & _
DRange.Cells.Count & vbCrLf
If AverageOpt Then Msg = Msg & "Average: " & _
Format(Application.Average(DRange), "0.00" & vbCrLf
If MedianOpt Then Msg = Msg & "Median: " & _
Format(Application.Median(DRange), "0.00" & vbCrLf
If StdevOpt Then Msg = Msg & "Std. dev.: " & _
Format(Application.StDev(DRange), "0.00" & vbCrLf
If MinOpt Then Msg = Msg & "Minimum: " & _
Application.Min(DRange) & vbCrLf
If MaxOpt Then Msg = Msg & "Maximum: " & _
Application.Max(DRange)
MsgBox Msg, vbInformation, "Summary Information"
I want to keep the msgbox and also place the information on a new sheet called report. I have gotten this far:
Sheet = "The summary measures for product " & Product & " in " & Region & " are:" & _
If CountOpt Then Sheet = Sheet & "Count: " & _
DRange.Cells.Count & vbCrLf & ActiveCell.Offset(1, 0)
If AverageOpt Then Sheet = Sheet & "Average: " & _
Format(Application.Average(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If MedianOpt Then Sheet = Sheet & "Median: " & _
Format(Application.Median(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If StdevOpt Then Sheet = Sheet & "Std. dev.: " & _
Format(Application.StDev(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If MinOpt Then Sheet = Sheet & "Minimum: " & _
Application.Min(DRange) & ActiveCell.Offset(1, 0) & vbCrLf
If MaxOpt Then Sheet = Sheet & "Maximum: " & _
Application.Max(DRange)
With Sheets("Report".Range("A1"
.Value = Sheet
The thing is that everything is in the first cell. I would like to get each option in a new row by it self.
Thanks
Msg = "The summary measures for product " & Product & " in " & _
Region & " are:" & vbCrLf & vbCrLf
If CountOpt Then Msg = Msg & "Count: " & _
DRange.Cells.Count & vbCrLf
If AverageOpt Then Msg = Msg & "Average: " & _
Format(Application.Average(DRange), "0.00" & vbCrLf
If MedianOpt Then Msg = Msg & "Median: " & _
Format(Application.Median(DRange), "0.00" & vbCrLf
If StdevOpt Then Msg = Msg & "Std. dev.: " & _
Format(Application.StDev(DRange), "0.00" & vbCrLf
If MinOpt Then Msg = Msg & "Minimum: " & _
Application.Min(DRange) & vbCrLf
If MaxOpt Then Msg = Msg & "Maximum: " & _
Application.Max(DRange)
MsgBox Msg, vbInformation, "Summary Information"
I want to keep the msgbox and also place the information on a new sheet called report. I have gotten this far:
Sheet = "The summary measures for product " & Product & " in " & Region & " are:" & _
If CountOpt Then Sheet = Sheet & "Count: " & _
DRange.Cells.Count & vbCrLf & ActiveCell.Offset(1, 0)
If AverageOpt Then Sheet = Sheet & "Average: " & _
Format(Application.Average(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If MedianOpt Then Sheet = Sheet & "Median: " & _
Format(Application.Median(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If StdevOpt Then Sheet = Sheet & "Std. dev.: " & _
Format(Application.StDev(DRange), "0.00" & ActiveCell.Offset(1, 0) & vbCrLf
If MinOpt Then Sheet = Sheet & "Minimum: " & _
Application.Min(DRange) & ActiveCell.Offset(1, 0) & vbCrLf
If MaxOpt Then Sheet = Sheet & "Maximum: " & _
Application.Max(DRange)
With Sheets("Report".Range("A1"
.Value = Sheet
The thing is that everything is in the first cell. I would like to get each option in a new row by it self.
Thanks