code for text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If Target.Column = 13 And Target.hastext Then _
Call CopyDoIt(Target)
Not sure if this is right it does not seem right. Trying to call DoIt if
text in column 13 Same idea for code works with numeric. This is first time
I've tried to call by text.
Thanks Much
 
Test for Numeric

If Isnumeric(target) then

or not

If Not IsNumeric(Target)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
If target.count > 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then
 
Thakks Again. Hope you had a joyus Bday
Tom Ogilvy said:
If target.count > 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then
 
If target.count > 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then _
call Copy DoIt (Target )
DoIt same as another I have but does not copy & paste? Must have to do with
useing text? Heres DoIt
ublic Sub CopyDoIt(ByVal Target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Set wksSummary = Sheets("Announcer")
Set rngPaste = wksSummary.Cells(65536, "A").End(xlUp).Offset(1, 0)
Application.EnableEvents = False
Set rngPaste = rngPaste.Offset(0, 0)
Range(Target.Offset(0, -8), Target.Offset(0, -4)).Copy _
Destination:=rngPaste
rngPaste.Offset(0, 5) = Target
Application.EnableEvents = True
End Sub

End result is to have Announcer wksheet have Cells from (row) in
Columns A:D:E:F:G:H
1 4 5 6 7 8
Hope I make sense
Thanks
 
disregard my last post. I got going down the wrong road. still would like to
know why it didn't work for future reference.
Thanks Again
 

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

Back
Top