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: 18
Default Problem with Code Below

Hi all

Can someone please explain why this isn't working? It is called from a
different Sub marco with What_I_Want being a text string I need to match. It
should return the value of hte column as well

Function Look_Up_Accross(ByVal What_I_Want)

Dim sStr As String, rng As Range

Set rng = Range(Cells(1, 1), Cells(1, 256).End(xlToLeft))
res = Application.Match(What_I_Want, rng, 0)
If Not IsError(res) Then
MsgBox "column: " & res
Else
MsgBox "Not found"
End If

Look_Up_Accross = res

End Function

Thanks, Ben H.
 
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
Code problem puiuluipui Excel Discussion (Misc queries) 3 July 3rd 09 07:27 PM
CODE PROBLEM N.F[_2_] Excel Discussion (Misc queries) 2 June 15th 07 08:07 PM
XLS to CSV Code Problem carl Excel Worksheet Functions 0 March 28th 07 01:21 AM
code problem scrabtree[_2_] Excel Programming 0 September 16th 04 03:48 PM
Code Problem ! Mike R Excel Programming 5 August 5th 03 03:35 PM


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