Quote:
Originally Posted by jt24152
Hi,
I have been trying to get a macros to run based on the value of a cell in Column D.
What I would like it to do. Look down through column "D" when the value of the cell is true perform a macros (which i have created). It has to recognize that the cell with the value of true is the "Activecell" as my macros is setup for active cell.
My code looks like this so far
Sub MacrosTest()
'
'
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
ActiveCell.Range("A1:C1").Select
Selection.Copy
Sheets("Blank Stickers").Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Select
ActiveSheet.Paste
Sheets("File").Select
ActiveCell.Select
End Sub
The Names of the sheets a
File
Blank Stickers
|
Hi,
Try this.
Sub CheckForsomething()
Range("D1").Activate
Do While ActiveCell.Value < ""
If ActiveCell.Value = True Then Call Macrotest
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
This code will start from Range D1 and will keep looking in column D until there is either an empty cell or the value of the cell is True.
If the value of cell is true this will call your procedure (macrotest).
Instead of calling the macro you may like to substitute your code in my procedure. Either ways, your purpose should be complete.
Let me know if it helps.
Thanks,
Prashant