Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel macro question 1

Status
Not open for further replies.

bobibob

Technical User
Jun 28, 2001
13
SI
Hello

I would like to write an if statement in macro and the condition should be depended on the 3rd letter in a cell?
(I would like that condition would be true if the third letter in a cell is for example "A")
 
If range is A1 then


If mid(range("A1").text,3,1) = "A" then
'Do stuff
else
'Don't do stuff
end if

HTH Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top