LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Convert VBA solution to a formula

Thank you very much.

It works fine ... I'll just need to study the formula a little more to
ensure I REALLY understand it!

Thanks again ... much appreciated.

"bpeltzer" wrote:

I think you need something like:
=MATCH(I4,OFFSET(B1,MATCH(I3,A:A)-1,0,1,5),0)
(I've used I3 to contain the code to match in column A and I4 to contain the
value to match in the corresponding row).
The general idea is that the innermost match function tells you what row you
want to search. The offset function returns the range of cells where you're
going to look for the number. The outer match figures out which column w/in
that row contains the number. You'll want to tweak this based on where your
input values are, whether you want exact matches or not, and what you want
returned upon matching the value.

"Toppers" wrote:

I have a table in columns A to F (but assume table size can vary). Column A
contains codes and columns B to F contain numeric data. This numeric data is
organised in ascending sequence (B to F) within each row.

I have a VBA (UDF) function which works fine but I am interested to know if
a possible solution exists using a formula.

What is required is to match a given code with codes in column A (to give
the ROW) and then to match a lookup value with the numeric data in columns B
to F for the ROW.

The first match (if indeed the MATCH function is used) will have a
"match_type=0" and the second match a "match_type=1" i.e. return a value less
than or equal to the "lookup_value".

My "problem" is that I can't figure out how to cater for the "dynamic" row
in the second Match.

Thanks in advance.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert the result of a formula to a whole number? crystal Excel Discussion (Misc queries) 1 April 28th 06 07:06 AM
How to set a formula to convert the time zone Calculate Date range Excel Worksheet Functions 1 April 20th 06 08:47 AM
convert formula to its value w/out copy and paste Allan Editor Excel Discussion (Misc queries) 3 January 12th 06 04:19 PM
vb help, convert from formula to vb code.. Michael A Excel Discussion (Misc queries) 1 January 7th 06 11:30 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"