View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark[_66_] Mark[_66_] is offline
external usenet poster
 
Posts: 24
Default If extension of a path in a cell is .pdf then

On Apr 30, 10:02*am, cht13er wrote:
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


Oh do I just use this as a function for column F?