Thread: Switch function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] kramer.newsreader@gmail.com is offline
external usenet poster
 
Posts: 10
Default Switch function

Correction
wrote:
Hi. I need to use something like a switch function.

I thought it was just "Switch" as it says here (and a couple of other
websites):

http://www.techonthenet.com/excel/formulas/switch.php

but when I try this:

=switch(J4=F2,1,J4=G2,2,3)

=switch(J4=F2,1,J4=G2,2,J4=H2,3)
actually gives the name error (although the above will give a name
error as well)


I get a name error. I'm using Excel 2003 SP2.

I don't want to use VLookup because I want the value that the function
returns to be from an evaluated formula not from a table and I'm using
references from multiple worksheets.