View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
cht13er cht13er is offline
external usenet poster
 
Posts: 141
Default If extension of a path in a cell is .pdf then

On Apr 30, 10:49*am, Mark wrote:
Hello

Was wondering how to go about this. *I have a bunch of file paths all
in column E. *I wanted to generate either "External" or "Internal"
into column F depending on whether the file extension is .pdf
or .html.

Any ideas?


=IF(RIGHT(E1,3) = "pdf", "External", IF(RIGHT(E1,4) = "html",
"Internal" , "Neither HTML nor PDF"))

Or do you need VBA code for some reason?

HTH

Chris