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: 1
Default Loop through cells

Hi,
Im an amateur in the Excel/ VB world and could really appreciate som
help here. Here's what Im doing.

Based on what a user selects in a list box, I want Excel to searc
througuh all the records in column A (range A4:A135) and if an entry i
column A matches the section from the list, to print 'Old' in the nex
column, same row.

Here's what I have:

Private Sub CmdIdentifyOld_Click()
Sheet2.Activate
Sheet2.Range("A3").Select

For i = 1 To 135
If ActiveCell.Text = ListOld.Value Then
ActiveCell.Next.Value = "Old"
Else
ActiveCell = ActiveCell.Offset(0, 1)
End If
Next i


End Sub

-------------------------------------------------------------------------

However, this doesn't really do much.
It does go to teh second worksheet and cell A3. However it doesnt loo
through the cells and match a value - it simply deletes the value i
A3.

Any help will be GREATLY appreciated.

Thanks

--
Message posted from http://www.ExcelForum.com

 
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
linked cells loop? Tom Ogilvy Excel Programming 3 April 2nd 04 09:56 PM
linked cells loop? Tom Ogilvy Excel Programming 0 April 2nd 04 05:36 PM
HOW-TO? Loop through cells in a column Mr. Clean[_2_] Excel Programming 4 December 12th 03 08:28 PM
VBA loop cells Adrie Rahanra Excel Programming 1 September 30th 03 10:22 AM
How to loop through cells in macro Andrew[_21_] Excel Programming 1 September 8th 03 08:21 PM


All times are GMT +1. The time now is 06:51 AM.

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"