LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Cell Text Search & Insert Value in Next Column

Hello I have a small problem searching for a value then getting the
value in the next column. If "spontaneous" is in the cell then I'd
prefer the next column's (B) cell to be 1 instead of the word in column
A being replaced with 1 (e.g. c.Value="1").

Would it be something like c.[offset].Value="1"?

Thanks for your help!

Shaun

--Code--
With Worksheets(1).Range("a1:a5")
Set c = .Find("spontaneous", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = "1"
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

 
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
Insert cell text every 5 rows in a column Mike Mike Excel Discussion (Misc queries) 9 September 16th 10 09:53 AM
Insert Column after specific text title the new column and add for David Excel Discussion (Misc queries) 5 October 2nd 09 04:03 PM
Q on how to search for text in a column TheMilkGuy Excel Discussion (Misc queries) 5 May 15th 09 04:48 PM
how to - Insert predifined text in each cell of a column npereira[_11_] Excel Programming 3 October 18th 05 09:52 PM
Insert cell/format/text/fontsize and auto insert into header? Unfurltheflag Excel Programming 2 November 3rd 04 05:39 PM


All times are GMT +1. The time now is 11:01 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"