A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Case Sensitive Lookup



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2009, 05:40 AM posted to microsoft.public.excel.misc
danpt
external usenet poster
 
Posts: 49
Default Case Sensitive Lookup

How do I make Range("A6") to return 97, as given in the sub.

Sub CaseSensitiveLookup()
Range("A1") = "a"
Range("B1") = "A"
Range("A2") = "97"
Range("B2") = "65"
Range("A5") = "a"
Range("A6") = "=LOOKUP(A5,$A$1:$B$1,$A$2:$B$2)" 'needs correction
End Sub
  #2  
Old May 14th, 2009, 05:54 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Case Sensitive Lookup

In A6

=INDEX(A2:B2,MATCH(TRUE,EXACT(A5,A1:B1),0))

Please note that this is an array formula. Within the cell in edit mode (F2)
paste this formula and press Ctrl+Shift+Enter to apply this formula. If
successful in the Formula Bar you can notice the curly braces at both ends
"{=formula}"

If this post helps click Yes
---------------
Jacob Skaria


"danpt" wrote:

How do I make Range("A6") to return 97, as given in the sub.

Sub CaseSensitiveLookup()
Range("A1") = "a"
Range("B1") = "A"
Range("A2") = "97"
Range("B2") = "65"
Range("A5") = "a"
Range("A6") = "=LOOKUP(A5,$A$1:$B$1,$A$2:$B$2)" 'needs correction
End Sub

  #3  
Old May 14th, 2009, 05:58 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Case Sensitive Lookup

Using LOOKUP

=LOOKUP(TRUE,EXACT(A5,A1:B1),A2:B2)

If this post helps click Yes
---------------
Jacob Skaria


"danpt" wrote:

How do I make Range("A6") to return 97, as given in the sub.

Sub CaseSensitiveLookup()
Range("A1") = "a"
Range("B1") = "A"
Range("A2") = "97"
Range("B2") = "65"
Range("A5") = "a"
Range("A6") = "=LOOKUP(A5,$A$1:$B$1,$A$2:$B$2)" 'needs correction
End Sub

  #4  
Old May 14th, 2009, 06:20 AM posted to microsoft.public.excel.misc
danpt
external usenet poster
 
Posts: 49
Default Case Sensitive Lookup

Thank you, Jacob

"Jacob Skaria" wrote:

Using LOOKUP

=LOOKUP(TRUE,EXACT(A5,A1:B1),A2:B2)

If this post helps click Yes
---------------
Jacob Skaria


"danpt" wrote:

How do I make Range("A6") to return 97, as given in the sub.

Sub CaseSensitiveLookup()
Range("A1") = "a"
Range("B1") = "A"
Range("A2") = "97"
Range("B2") = "65"
Range("A5") = "a"
Range("A6") = "=LOOKUP(A5,$A$1:$B$1,$A$2:$B$2)" 'needs correction
End Sub

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:20 PM.


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