View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
build build is offline
external usenet poster
 
Posts: 22
Default Variables in formulas

G'day All,
Is it possible to use variables in formulas without storing them in a cell?

i.e. (a simplified example)
VarA=SUMIF(A:A,Y:Y,X:X)
VarB=SUMIF(A:A,Y:Y,W:W)
IF(B:B<VarA,VarA,VarB)

looks a lot better than
IF(B:B<SUMIF(A:A,Y:Y,X:X),SUMIF(A:A,Y:Y,X:X),SUMIF (A:A,Y:Y,W:W))

The formula I have is too long and complex therefor would be a nightmare to
trouble shoot a year down the track. Also storing the variables in a cell
seems sloppy to me.