View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default Set Column choice to a variable from a Drop Down

This is a segment of a working macro where I would like to be able to choose the column in a drop down to for Set rngFirst =


strFindWhat = Range("G1")

Set rngFirst = Range("A:A").Find(What:=strFindWhat, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)


Basically I want to change A:A to B:B or C:C by selecting it from a drop down and look for "strFindWhat" in that column.

So if I chose C:C in the drop down then I would have:

Set rngFirst = Range("C:C").Find(What:=strFindWhat,

Thanks.
Howard