LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Understanding Issues with INTERSECT function in VBA

Good morning.

In an application I'm currently developing, I read two two pieces of data from a list (x,y), then map each x,y pair into a table which has X columns and Y rows.

Everything works fine except I've found that if I don't select the row and column prior to using the intersect function the routine fails with the following error:

Run-time error 13: Type mismatch

My pseudo code looks like:

do for the list of values

find the column in the table corresponding to the X value in the list
set column as rngX
rngX.Select

find the row in the table correcponding to the Y value in the list
set row as rngY
rngY.select

application.Intersect (rngX, rngY) = application.Intersect (rngX, rngY)+1

loop

If I don't include both rngX.Select and rngY.Select commands in exactly the sequence shown the code does not work. Any explanation why?

Art
 
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
understanding issues with INTERSECT function in VBA [email protected] Excel Programming 0 February 16th 15 06:23 PM
Non-Intersect Function ExcelMonkey Excel Programming 3 May 27th 08 10:18 PM
Intersect Function Problem [email protected] Excel Programming 5 September 20th 06 09:15 PM
Is there any who can help in understanding the VLOOKUP function Ajay Excel Discussion (Misc queries) 1 October 26th 05 08:19 AM
Understanding Checkbox function Lori Burton Charts and Charting in Excel 1 July 25th 05 01:26 PM


All times are GMT +1. The time now is 12:08 AM.

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

About Us

"It's about Microsoft Excel"