Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pick a row
Can anyone tell me how I can I put a value in cell $row$20 where row is the
row with "Summary" in the first column and the column is 20 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pick a row
Myles
This will do what you want I think Sub FindSummary() Dim rRng As Range Set rRng = Range("A:A").Find("Summary") If rRng Is Nothing Then MsgBox "Summary not found" Exit Sub End If rRng.Offset(0, 20).Value = 12345 End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "myleslawrence" wrote in message ... Can anyone tell me how I can I put a value in cell $row$20 where row is the row with "Summary" in the first column and the column is 20 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pick a row
Try this:
sub summary() for i = 1 to activesheet.usedrange.rows.count if range("A" & i) = "Summary" then range(20, i) = "My Value" end if next end sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pick a row
Dim rng as Range, rng1 as Range
Dim res as Variant, lRow as long set rng = Range("A1:A1000") res = Application.Match("Summary",rng,0) if not iserror(res) then set rng1 = rng(res) lRow = rng1.Row cells(lRow,20).Value = "a Value" End If -- Regards, Tom Ogilvy "myleslawrence" wrote in message ... Can anyone tell me how I can I put a value in cell $row$20 where row is the row with "Summary" in the first column and the column is 20 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pick a row
Thanks to all. This kind of response is terrific!
"Tom Ogilvy" wrote in message ... Dim rng as Range, rng1 as Range Dim res as Variant, lRow as long set rng = Range("A1:A1000") res = Application.Match("Summary",rng,0) if not iserror(res) then set rng1 = rng(res) lRow = rng1.Row cells(lRow,20).Value = "a Value" End If -- Regards, Tom Ogilvy "myleslawrence" wrote in message ... Can anyone tell me how I can I put a value in cell $row$20 where row is the row with "Summary" in the first column and the column is 20 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pick top 5 out of 8 numbers | Excel Discussion (Misc queries) | |||
Pick from lists | Excel Discussion (Misc queries) | |||
Making pick list conditional on selection from previous pick list | Excel Discussion (Misc queries) | |||
Pick list | Excel Discussion (Misc queries) | |||
Pick Several, Add All, Remove All | Excel Programming |