Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.macintosh
|
|||
|
|||
![]()
I'm trying to write a function that can look at the values in eight columns
of a row, pick the two columns that have actual numbers (as opposed to NAs), then compare those two numbers to another pair of numbers. Anyone know how to write a function that can search that way ? Thanks, Mike |
#2
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.macintosh
|
|||
|
|||
![]()
For each row... these two numbers could be added to an array and then used
as a comparison tool. Where are the other two number going to be located? Will they be located there for each row that is evaluated? Mark "Michael Levin" wrote in message ... I'm trying to write a function that can look at the values in eight columns of a row, pick the two columns that have actual numbers (as opposed to NAs), then compare those two numbers to another pair of numbers. Anyone know how to write a function that can search that way ? Thanks, Mike |
#4
![]()
Posted to microsoft.public.excel.macintosh,microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub get_data()
Dim MyNumbers(2) MyRow = 5 MyStartCol = Range("B2").Column MyEndCol = Range("I2").Column Count = 0 For i = MyStartCol To MyEndCol If Not WorksheetFunction.IsNA(Cells(MyRow, i)) Then MyNumbers(Count) = Cells(MyRow, i) If Count = 1 Then Exit For Count = Count + 1 End If Next i End Sub "Michael Levin" wrote: I'm trying to write a function that can look at the values in eight columns of a row, pick the two columns that have actual numbers (as opposed to NAs), then compare those two numbers to another pair of numbers. Anyone know how to write a function that can search that way ? Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
compare 2 columns of numbers and place the matched numbers in a 3r | Excel Discussion (Misc queries) | |||
compare two text columns and find the closest matched pair of cells | Excel Programming | |||
Compare to columns on two different spread sheet, only pick up the | Excel Programming | |||
etsimate values of a linear trend for each pair of known values | Excel Discussion (Misc queries) | |||
Excel Compare values in columns & display missing values in a new | Excel Discussion (Misc queries) |