Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Intersect Formula VBA Help

I need help with a VBA Intersect Formula. I have
locations identified going across the top of my
spreadsheet and then locations identified going down the
side of my spreadsheet. At the appropriate row/column
intersect cell the distance between the two locations is
identified.

I am going to have a userform pop-up and the staff can,
using a combo box, select the to and from location. I
need a formula that will look accross for the from
location and down the side for the to location and then
give me the intersect value????

SDC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Intersect Formula VBA Help

In the worksheet you would do

=Offset(A1,Match(to,A1:A200,0),Match(from,A1:AC1))

You can use the same formulas in VBA

With Application
miles =
..Offset(Range("A1"),.Match(to,Range("A1:A200"),0) ,.Match(From,Range("A1:AC1"
),0))
End With

where from and to represent string variables containing locations that
match one of your column and row entries.

--
Regards,
Tom Ogilvy

"scrabtree" wrote in message
...
I need help with a VBA Intersect Formula. I have
locations identified going across the top of my
spreadsheet and then locations identified going down the
side of my spreadsheet. At the appropriate row/column
intersect cell the distance between the two locations is
identified.

I am going to have a userform pop-up and the staff can,
using a combo box, select the to and from location. I
need a formula that will look accross for the from
location and down the side for the to location and then
give me the intersect value????

SDC



Reply
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
Intersect Line GoodTrouble Charts and Charting in Excel 4 January 29th 08 05:08 PM
how to find an intersect of two columns sarora New Users to Excel 3 May 31st 06 03:32 AM
Intersect operations heyes Excel Worksheet Functions 4 February 14th 06 05:13 PM
How do I find where a column value and row value intersect? Amy Excel Worksheet Functions 2 January 12th 05 11:19 PM
Help with If Not Intersect derek Excel Programming 6 July 11th 03 04:39 PM


All times are GMT +1. The time now is 09:45 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"