JasonLeVan
Board Regular
- Joined
- Feb 7, 2011
- Messages
- 121
Below is my macro and it almost works, its only problem is I want it to search ALL of column B for a "*". if it finds one to execute the macro and repeat till all rows are checked, but i can only get it to work by going to a specific cell. Any help
Sub Macro1()
Sheets("Sheet1").Select
Range("B8").Select
Again:
If ActiveCell.Value = "" Then Exit Sub
If ActiveCell.Value = "*" Then
Number = ActiveCell.Row
Range("B" & Number).CLEAR
Description = Application.InputBox("Please enter the Descripton:", "Description")
Cost = Application.InputBox("Please enter the Cost:", "Cost")
Retail = Application.InputBox("Please enter the Retail:", "Retail")
Range("B" & Number).CLEAR
Range("G" & Number).Value = Description
Range("K" & Number).Value = Cost
Range("M" & Number).Value = Retail
ActiveCell.Offset(1, 0).Select
GoTo Again
Else
ActiveCell.Offset(1, 0).Select
GoTo Again
End If
End Sub
Sub Macro1()
Sheets("Sheet1").Select
Range("B8").Select
Again:
If ActiveCell.Value = "" Then Exit Sub
If ActiveCell.Value = "*" Then
Number = ActiveCell.Row
Range("B" & Number).CLEAR
Description = Application.InputBox("Please enter the Descripton:", "Description")
Cost = Application.InputBox("Please enter the Cost:", "Cost")
Retail = Application.InputBox("Please enter the Retail:", "Retail")
Range("B" & Number).CLEAR
Range("G" & Number).Value = Description
Range("K" & Number).Value = Cost
Range("M" & Number).Value = Retail
ActiveCell.Offset(1, 0).Select
GoTo Again
Else
ActiveCell.Offset(1, 0).Select
GoTo Again
End If
End Sub