Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to perform a process each row

I would like to check a value in each cell in column L starting at row
to the last row that contains data and perform an action on each ro
that contains a specific value in that cell. How do I find the las
row that contains data and how would I select the rows that contain th
value in the cell I am interested

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Using VBA to perform a process each row

Hi
try the following

Public Sub Foo()
Dim R As Long
Dim lastrow

lastrow = Activesheet.Cells(Rows.Count,"L").End(xlUp).Row
If lastrow < 4 then exit sub
For R = 4 to lastrow
If cells(R,"L").value = "value" Then
'do your action on cells(R,"L")
End If
Next R
end sub

--
Regards
Frank Kabel
Frankfurt, Germany

I would like to check a value in each cell in column L starting at
row 4 to the last row that contains data and perform an action on
each row that contains a specific value in that cell. How do I find
the last row that contains data and how would I select the rows that
contain the value in the cell I am interested?


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to perform a process each row

Thank you. That seems to do the trick

--
Message posted from http://www.ExcelForum.com

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
Time to process CASBMS Excel Discussion (Misc queries) 0 February 27th 07 08:41 PM
perform 1 function, stop, perform different function nastech Excel Discussion (Misc queries) 0 August 22nd 06 12:21 PM
If/then Process? Zane B Stein Excel Discussion (Misc queries) 1 December 20th 05 03:27 PM
thought process Robert Couchman[_4_] Excel Programming 3 March 1st 04 04:20 PM
step into process Tom Ogilvy Excel Programming 0 August 16th 03 12:46 PM


All times are GMT +1. The time now is 10:02 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"