I have 4 worksheets that I deal with in the code. "FORMULAS, INPUTS, OUTPUTS, LOAD."
In "LOAD" I take 3 user defined specifications (3 columns) and allow the user to make as many rows as they would like. Currently there are restrictions but I'm not ready to deal with them yet. As of now the code works.
The "FORMULAS" worksheet takes one row at a time from "LOAD" and changes all necessary data. Then I copy that data from "FORMULAS" to "INPUTS" or "OUTPUTS."
Sub Rectangle_Click()
Sheets("Load").Select
Range("A2").Select
Do
If ActiveCell.Offset(0, 1).Value = "xxxxx" Then
Call Copy
End If
' Sheets("Load").Select
' ActiveCell.Offset(1, -3).Select
Loop Until IsEmpty(ActiveCell)
End Sub
Sub Copy()
Selection.Copy
Sheets("Formulas").Select
Range("G2").Select
ActiveSheet.Paste
Sheets("Load").Select
ActiveCell.Offset(0, 2).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Formulas").Select
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveSheet.Paste
Sheets("Load").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Formulas").Select
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveSheet.Paste
Range("A4:F61").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Master_Inputs").Select
'''''''''''''''''''''''''''''''''''''''''''
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
'''''''''''''''''''''''''''''''''''''''''''
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Formulas").Select
Range("A63:F79").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Master_Outputs").Select
'''''''''''''''''''''''''''''''''''''''''''
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
'''''''''''''''''''''''''''''''''''''''''''
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Load").Select
ActiveCell.Offset(1, -3).Select
End Sub
EDIT: The point of my program is taking a little bit of user information and generating a specific sheet that manually would take hours to generate.
Bookmarks