Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDFs needed I think they're pretty easy but I can't figure them ou
All of this explanation assumes that the UDF will only look at one row so by
range I mean a specified number of columns in the same row that are all clumped together (no breaks in the range). I need a UDF that can be dragged down to start in cell D2 that will look at a range in the row that the formula will be on (the range could be E2 to J2 for example) that will look for the first cell in that range that has a value and from there count the number of blank cells until the end of the range (not the last cell with a value, I want it to count the blank cells all the way to the end of the specified range). Then I need a UDF that will count the total number of cells in a row that will find the first cell in the range that has a value and count the number of cells until the end of the range (again all the way to the end, not the last cell with a value) Finally I need a UDF that will find the last cell in a range that has a value and count the number of blank cells to the end of the range I'm pretty sure all three of these are similar I just can't figure out how to start this. Thank you in advance for your help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDFs needed I think they're pretty easy but I can't figure them ou
Hi,
Try this : Sub Test() Debug.Print Application.CountIf(Range("A1:A100"), "") End Sub will count if blank -- Regards, Halim "Still Learning" wrote: All of this explanation assumes that the UDF will only look at one row so by range I mean a specified number of columns in the same row that are all clumped together (no breaks in the range). I need a UDF that can be dragged down to start in cell D2 that will look at a range in the row that the formula will be on (the range could be E2 to J2 for example) that will look for the first cell in that range that has a value and from there count the number of blank cells until the end of the range (not the last cell with a value, I want it to count the blank cells all the way to the end of the specified range). Then I need a UDF that will count the total number of cells in a row that will find the first cell in the range that has a value and count the number of cells until the end of the range (again all the way to the end, not the last cell with a value) Finally I need a UDF that will find the last cell in a range that has a value and count the number of blank cells to the end of the range I'm pretty sure all three of these are similar I just can't figure out how to start this. Thank you in advance for your help! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDFs needed I think they're pretty easy but I can't figure them ou
Start from this and add :
Public Function RowNumber() As Long RowNumber = Application.Caller.Row End Function NickHK "Still Learning" ... All of this explanation assumes that the UDF will only look at one row so by range I mean a specified number of columns in the same row that are all clumped together (no breaks in the range). I need a UDF that can be dragged down to start in cell D2 that will look at a range in the row that the formula will be on (the range could be E2 to J2 for example) that will look for the first cell in that range that has a value and from there count the number of blank cells until the end of the range (not the last cell with a value, I want it to count the blank cells all the way to the end of the specified range). Then I need a UDF that will count the total number of cells in a row that will find the first cell in the range that has a value and count the number of cells until the end of the range (again all the way to the end, not the last cell with a value) Finally I need a UDF that will find the last cell in a range that has a value and count the number of blank cells to the end of the range I'm pretty sure all three of these are similar I just can't figure out how to start this. Thank you in advance for your help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy/Paste cell down to next value- Easy question, can't figure it | Excel Discussion (Misc queries) | |||
Easy Problem that I can't figure out | Excel Discussion (Misc queries) | |||
Formula needed to show the second to last figure in range of cells | Excel Worksheet Functions | |||
Pretty easy If loop - help!! | Excel Worksheet Functions | |||
Maybe an easy If / Then statement? But I can't figure it out. Help! | Excel Programming |