Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, i need to make a sub find the row number of a cell that countains
specific value. This is the first part what is going to be a lon function and this will help me define ranges. here is the code. Sub freq() Dim IndexColumnlastRow As Long Dim TimeOfDayToFind As String Dim TimeOfDaysRowNumber As Single Worksheets("frequency").Select With Worksheets("frequency") Range("b3").Select IndexColumnlastRow = Cells(Rows.Count, "a").End(xlUp).Row TimeOfDayToFind = ActiveCell.Offset(-1, 0).Value End With With Worksheets("zscore") Range("a1:a16").Select For Each cell In Selection If cell.Value = TimeOfDayToFind Then cell.Select TimeOfDaysRowNumber = Application.WorksheetFunction.Row(cell) End If Next End With MsgBox IndexColumnlastRow MsgBox TimeOfDayToFind MsgBox TimeOfDaysRowNumber End Sub Any assistance is appreciated -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
if meets criteria add 1 | Excel Worksheet Functions | |||
Add up a value that meets 2 criteria | Excel Discussion (Misc queries) | |||
Do Nothing If Meets Criteria | Excel Discussion (Misc queries) | |||
how can i count a number that meets a criteria? | Excel Worksheet Functions | |||
Max value that meets a criteria | Excel Worksheet Functions |