Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HELP with this code!
Function FindNth(Table As Range, Val1 As Variant, Val1Occrnce As Integer,
ResultCol As Integer) Dim i As Integer Dim iCount As Integer Dim rCol As Range For i = 1 To Table.Rows.Count If Table.Cells(i, 1) = Val1 Then iCount = iCount + 1 End If If iCount = Val1Occrnce Then FindNth = Table.Cells(i, ResultCol) Exit For End If Next i End Function Hi this is the code that i use to populate nth occurrenece of recurring data. but in this function i have input the occurrence value manually. but is there any way that occurrence value changes by itself. for example lets say, if i have 10 repeating jobs, row 1-10 with different data, for each row in a different worksheet i wanna get the data from that perticular row. like for 2nd occurrence i want the value taken from 2nd row, 3occurrenece 3rd row n so on. but i want the fucntion to jump to the next occurence by itself. any help???? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
option buttons run Click code when value is changed via VBA code | Excel Programming |