Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your response.
I'm not sure that I understand what you are suggesting. I added an example code. The function takes the range and returns only the negative numbers. As it is, the user has to select enough cells and use it as an array function (Ctrl+Shift+Enter). Function testit(inputRange As Range) Dim output() As Double Dim i As Integer i = 0 For Each c In inputRange.Cells If (c.Value < 0) Then ReDim Preserve output(i) output(UBound(output)) = c.Value i = i + 1 End If Next c testit = output End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to get average of successive x-number cells to output in colum | Excel Discussion (Misc queries) | |||
Comparing cells and output text | Excel Worksheet Functions | |||
Confusing output from cells | Excel Discussion (Misc queries) | |||
Getting output from an excel output back to cscript.. | Excel Programming | |||
Custom function to return output in multiple cells | Excel Programming |