#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
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
pick top 5 out of 8 numbers poncho Excel Discussion (Misc queries) 4 February 12th 09 08:02 AM
Pick from lists rbrickl Excel Discussion (Misc queries) 1 July 27th 06 12:16 AM
Making pick list conditional on selection from previous pick list Stewart Excel Discussion (Misc queries) 1 June 27th 05 11:30 AM
Pick list Antonio Guillen Excel Discussion (Misc queries) 3 March 12th 05 03:24 PM
Pick Several, Add All, Remove All Leo Elbertse Excel Programming 4 December 31st 03 12:13 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"