Hi there,
Please see attached the sample images. In the "Input Tab", I have assigned "ID" to each unique ID, and in the "Output Sheet", it runs all the simulations and prints the results. However, as you will notice for ID = "1", there are two unique IDs, but the VBA prints only the data relating to first unique ID. Any suggestions to print all unique ID data?
Also, when I mentioned skip blank rows, if you change the ID = "4", there is only one unique ID. Therefore, I want the VBA to skip the remaining rows and move to the next ID.
Any suggestions or change to the the below VBA code is much appreciated.
Thanks
Thanks
Please see attached the sample images. In the "Input Tab", I have assigned "ID" to each unique ID, and in the "Output Sheet", it runs all the simulations and prints the results. However, as you will notice for ID = "1", there are two unique IDs, but the VBA prints only the data relating to first unique ID. Any suggestions to print all unique ID data?
Also, when I mentioned skip blank rows, if you change the ID = "4", there is only one unique ID. Therefore, I want the VBA to skip the remaining rows and move to the next ID.
Any suggestions or change to the the below VBA code is much appreciated.
Thanks
VBA Code:
Sub Output()
Application.ScreenUpdating = False
[Output_Consol].ClearContents
Dim Temp1 As Integer
Dim i As Integer
Temp1 = Range("ID").Value
For i = 1 To Range("Num_Sims").Value
If [Sample_Simulations].Value <> "" Then
[Sample_Simulations].Copy
Sheets("Output").Select
Sheets("Output").Cells(13 + i, 2).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End If
Range("ID").Value = i
Application.StatusBar = ([Num_Sims] - i)
Next i
End Sub