Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Understanding Issues with INTERSECT function in VBA
Showing pseudo code isn't going to cut it here. Give us the real stuff
so we know exactly what it does and the how of it! As for .Select.., you don't need to select anything to act on it as long as you have a fully qualified ref to the cell address/index in the table. Not knowing the purpose for finding the coordinates, nor why you think you need to use the Intersect() function, there are more efficient ways to go about getting a cell index! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
understanding issues with INTERSECT function in VBA | Excel Programming | |||
Non-Intersect Function | Excel Programming | |||
Intersect Function Problem | Excel Programming | |||
Is there any who can help in understanding the VLOOKUP function | Excel Discussion (Misc queries) | |||
Understanding Checkbox function | Charts and Charting in Excel |