Help linking true false in column to start macros

J

jt24152

Hi,
I have been trying to get a macros to run based on the value of a cel
in Column D.
What I would like it to do. Look down through column "D" when the valu
of the cell is true perform a macros (which i have created). It has t
recognize that the cell with the value of true is the "Activecell" as m
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 are:
File
Blank Sticker
 
J

jt24152

jack_n_bub;1606995 said:
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
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 m
procedure. Either ways, your purpose should be complete.

Let me know if it helps.

Thanks,
Prashant

Well. It is doing something but not what i would have hoped.
Currently it runs clear down my list of numbers but it is still onl
performing the macros of copy pasting from the current sheet (File) t
the other sheet (Blank Stickers) in the row of the active cell at whic
i have selected prior to runs the macros. It doesn't seem to be lookin
for true/false/blank in column "D". Frustrating.
Any other ideas

+-------------------------------------------------------------------
+-------------------------------------------------------------------
 
J

jack_n_bub

jt24152;1607018 said:
Well. It is doing something but not what i would have hoped.
Currently it runs clear down my list of numbers but it is still onl
performing the macros of copy pasting from the current sheet (File) t
the other sheet (Blank Stickers) in the row of the active cell at whic
i have selected prior to runs the macros. It doesn't seem to be lookin
for true/false/blank in column "D". Frustrating.
Any other ideas?

Hi,

Is it fine for you to share a sample. As told earlier, there are bette
ways to perform your task but I provided the solution as per you
requirement.

I can look into your code and make necessary corrections and send i
back to you.

By the way, you need to run my macro after you have activated the shee
which has column D you are checking for. And I am also assuming that th
keyword True is a logical value not a text, i.e. not "TRUE" but TRU
(logical value).

Thanks,
Prashan

+-------------------------------------------------------------------
+-------------------------------------------------------------------
 
J

jt24152

So your formula works great now that I moved the True/False to colum
"A"

The only other think is my Macros I created to copy and paste fro
Sheet1 to sheet2 stops with an error and will not continue to loop th
checkforsomething.

Any ideas on how to fix it so after my macros is finished that i
continues on with the one you gave me?
Here is my code
Sub Move()
'
' Move Macro
'

'
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(0, 1).Range("A1:C1").Select
Selection.Copy
Sheets("BlankStickers").Select
ActiveCell.Offset(-2, 0).Range("A1").Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
Sheets("File").Select
End Sub


It stops on Sheets("File").Selec

+-------------------------------------------------------------------
+-------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top