Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This will do it, its configured for sheet 2 but you will get my idea
If you want my test workbook I can email it to you prec Sub Macro2() Dim LastRow LastRow = Sheet2.UsedRange.Row + 1 _ + Sheet2.UsedRange.Rows.Count For x = 1 To LastRow If Val(Sheet2.Cells(x, 1).Value) "0" And Val(Sheet2.Cells(x, 1).Value) < "11" Then Sheet2.Range("B" & x).Value = "Engalnd" ElseIf Val(Sheet2.Cells(x, 1).Value) "10" And Val(Sheet2.Cells(x, 1). Value) < "21" Then Sheet2.Range("B" & x).Value = "Scotland" ElseIf Val(Sheet2.Cells(x, 1).Value) "20" And Val(Sheet2.Cells(x, 1). Value) < "31" Then Sheet2.Range("B" & x).Value = "Ireland" End If Next End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200605/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I assign range to variant and use | Excel Discussion (Misc queries) | |||
Assign a Name to a Range in VBA | Excel Programming | |||
assign value to range in VBA function | Excel Programming | |||
assign a value to a range | Excel Discussion (Misc queries) | |||
Assign a random selection to a range | Excel Programming |