Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search a Range take Action
Hi Can any one help? If I had a set of values in a given range of a Spread Sheet, let’s say the numbers 1-10 in cells B1 - B10. Using VBA What code would I require to search the range looking for lets say "3". When found a value lets say "Yes" would be put into cell C3 or any cell to the left of where the value 3 was found. Many thanks Kev *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search a Range take Action
Sub Locate()
Dim rng As Range Dim iAns As Integer Set rng = Application.InputBox("Enter range, e.g. A1:A8, by typing or sweeping cells.", Type:=8) iAns = Application.InputBox("Look for what?") For Each c In rng If c = iAns Then c.Offset(0, 1) = "Yes" Next c End Sub Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search a Range take Action
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Performing Action on a Range of Rows | Excel Discussion (Misc queries) | |||
Performing Action on a Range of Rows | Excel Discussion (Misc queries) | |||
Loop through range of cells, string search, take action | Excel Programming | |||
Problem with action on range change | Excel Programming | |||
Can I protect a range of worksheets in a book with one action? | Excel Worksheet Functions |