View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
excel wonk excel wonk is offline
external usenet poster
 
Posts: 5
Default Shorcuts or Macro for Creating If Else Statements

I create if else statements often. But I find it tedious to have to
type them and redefine them all the time for different workbooks.

For example, let's say you want this type of if else condition for
calculating price to earnings:

a1=price; b1=earnings

=if ( iserror( a1/b1),"n/a", if (or( a1/b1<0, a1/b1100),"nmf",
a1/b1))

Is there a way of shortening this? What I mean is, of course I can
copy this down the column and calculate a bunch of P/Es for a bunch of
companies.

I'm trying to see if there is a macro or short cut that will help you
create if else statements.