Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Match

XL2000

I am trying to use the match function, by modifying some existing code .
The original code is for a row but the new code is for a column. The
problem is that is not selecting the right cell. Instead it is selecting
the cell one column to the left and up one. I have tried playing with the
settings but cannot get it too select the cell I want. Below is the code I
am using. Any help would be greatly appreciated.

Dim F As Single
Dim FPos As Long
Dim FRng As Range
F = Application.WorksheetFunction.Max(.Range("CY12:CY1 6"))
FPos = WorksheetFunction.Match(F, .Range("CY12:CY16"), 0)
Set FRng = .Range("CY12:CY16").Cells(1, FPos)
FRng.Select

It should select CY13 but it select CX12
Ta,
Martin


 
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
Match 2 Columns, Return 3rd, Differing Match Types Matt.Russett Excel Worksheet Functions 3 May 11th 10 10:45 AM
Lookup Formula: Return 1st match, then 2nd match, then 3rd match Scott Excel Discussion (Misc queries) 4 December 11th 09 05:50 AM
index(match) Wind Uplift Calculations (match four conditions) JMeier Excel Worksheet Functions 8 August 1st 08 01:45 AM
MATCH Multiple Criteria & Return Previous / Penultimate Match Sam via OfficeKB.com Excel Worksheet Functions 27 October 6th 07 01:39 AM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM


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