Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
linked cells loop? | Excel Programming | |||
linked cells loop? | Excel Programming | |||
HOW-TO? Loop through cells in a column | Excel Programming | |||
VBA loop cells | Excel Programming | |||
How to loop through cells in macro | Excel Programming |