Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default Creating an excel function

Hi, Im sick and tired always having to use VB when a Case structure is need,
how could I create a case structure; I want to appears like this:

€œ=case(a1=b1;ab1;a1=b2;c1;a1=b3;ab3;a1=b4;b1€¦. .)€ or
€œ=case(a1=b1;a1=b2;ab1;c1€¦..)€

In English: When a1=b1 print ab1, when a1=b2 print c1 and so on.

So, how could I create my own case function?
PD. I know €œ=if€ allow 9 condition, I dont want use =if, =vlookup, =lookup
or =hlookup

TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Creating an excel function

Hi there,

Well, you are limited to 7 nested IF functions - not 9; 8 with the original.
And why not a LOOKUP? Is there something wrong with those? Why a UDF?
What does your data look like and what are the ranges in which you are
looking at? Please explain more.

--
Regards,
Zack Barresse, aka firefytr


"filo666" wrote in message
...
Hi, I'm sick and tired always having to use VB when a Case structure is
need,
how could I create a case structure; I want to appears like this:

"=case(a1=b1;ab1;a1=b2;c1;a1=b3;ab3;a1=b4;b1.. .)" or
"=case(a1=b1;a1=b2;ab1;c1...)"

In English: When a1=b1 print ab1, when a1=b2 print c1 and so on.

So, how could I create my own case function?
PD. I know "=if" allow 9 condition, I don't want use =if, =vlookup,
=lookup
or =hlookup

TIA




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Creating an excel function

Why not use one of the lookups? Lots more equalities can be included, much
easier to maintain, etc, etc, etc

For your first example. assuming the conditions are mutually exclusive.

=(a1=b1)*ab1+(a1=b2)*c1+(a1=b3)*ab3+....

If they're not mutually exclusive then...good luck


"filo666" wrote in message
...
Hi, I'm sick and tired always having to use VB when a Case structure is
need,
how could I create a case structure; I want to appears like this:

"=case(a1=b1;ab1;a1=b2;c1;a1=b3;ab3;a1=b4;b1.. .)" or
"=case(a1=b1;a1=b2;ab1;c1...)"

In English: When a1=b1 print ab1, when a1=b2 print c1 and so on.

So, how could I create my own case function?
PD. I know "=if" allow 9 condition, I don't want use =if, =vlookup,
=lookup
or =hlookup

TIA




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating an excel function

Use the choose worksheet function.

--
Regards,
Tom Ogilvy


"filo666" wrote in message
...
Hi, I'm sick and tired always having to use VB when a Case structure is

need,
how could I create a case structure; I want to appears like this:

"=case(a1=b1;ab1;a1=b2;c1;a1=b3;ab3;a1=b4;b1.. .)" or
"=case(a1=b1;a1=b2;ab1;c1...)"

In English: When a1=b1 print ab1, when a1=b2 print c1 and so on.

So, how could I create my own case function?
PD. I know "=if" allow 9 condition, I don't want use =if, =vlookup,

=lookup
or =hlookup

TIA




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Function in Excel 2003 Patti Excel Worksheet Functions 2 September 8th 09 07:24 PM
Excel Template (Creating a Function in the template) Té Excel Worksheet Functions 3 March 6th 09 07:17 AM
Help Creating a Function in Excel [email protected] Excel Discussion (Misc queries) 2 January 21st 07 07:35 PM
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Creating a new sinus function in VBA Excel Bogdan[_2_] Excel Programming 0 May 11th 04 04:44 PM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"