Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default code for text

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default code for text

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)

"Curt" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default code for text

If target.count 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then

--
Regards,
Tom Ogilvy


"Curt" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default code for text

Thakks Again. Hope you had a joyus Bday
"Tom Ogilvy" wrote:

If target.count 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then

--
Regards,
Tom Ogilvy


"Curt" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default code for text




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
--
Regards,
Tom Ogilvy





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default code for text

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

"Tom Ogilvy" wrote:

If target.count 1 then exit sub
if Target.column = 13 and VarType(target.value) = vbString then

--
Regards,
Tom Ogilvy


"Curt" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text format - setting text colour with code NDBC Excel Discussion (Misc queries) 6 July 1st 09 10:15 PM
Macro - Fixed text code needs replacing with variable text steven.holloway Excel Discussion (Misc queries) 3 July 22nd 08 03:57 PM
Code for searching & copying Text from 1 text file to another J@Y Excel Programming 2 June 27th 07 04:16 PM
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
How to format text in a Text box using VBA code Shane B Excel Programming 3 November 15th 04 03:31 PM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"