Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Compound IF statement

I am attempting to code a UDF for the first time. The small spreadsheet I've
set up is in sheet 1 ("Database") and just two columns relate to my
question. Col 1 is populated with either "BA" or "V" and Col 2 with "AD" or
"DC". If BA = DC, then I need to sum those enties into a cell on a report
section on sheet 2 ("Report"). Thus, I an ignoring "V" and "AD" entries.

How do I code the UDF? How do I get it into the spreadsheet? I have been
reading about VBA, know I need a UDF and need a Sub routine to call the UDF.
But I've never done either of those events.

I am using Excel 2000.

Any help at all, with either of these questions, would be so much
appreciated!

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Compound IF statement

Di
It's hard to follow what you are saying. You say "If BA = DC" but that
can never be. Do you mean when Col 1 has BA and the corresponding cell in
Col 2 has DC? Then you say you want to "sum those entries". There is
nothing to sum. Do you mean that you want to count the number of rows that
have both BA in Col 1 and DC in Col 2?
For what you want, a count in some cell, you would not need a sub
routine to call the UDF. You would simply put the UDF name and whatever
argument(s) you have, in that cell. Something like:
=MyUDF(TheArgument).
Please post back and clarify what you want to do and you will get plenty
of help. HTH Otto
"Di" <Di @discussions.microsoft.com wrote in message
...
I am attempting to code a UDF for the first time. The small spreadsheet
I've
set up is in sheet 1 ("Database") and just two columns relate to my
question. Col 1 is populated with either "BA" or "V" and Col 2 with "AD"
or
"DC". If BA = DC, then I need to sum those enties into a cell on a report
section on sheet 2 ("Report"). Thus, I an ignoring "V" and "AD" entries.

How do I code the UDF? How do I get it into the spreadsheet? I have
been
reading about VBA, know I need a UDF and need a Sub routine to call the
UDF.
But I've never done either of those events.

I am using Excel 2000.

Any help at all, with either of these questions, would be so much
appreciated!

Thank you.



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
Compound If, And Or - can Jim May Excel Discussion (Misc queries) 7 September 26th 07 01:10 PM
How do I write a compound if statement? Diane Excel Worksheet Functions 5 May 17th 07 08:52 PM
compound tikchye_oldLearner57 Excel Discussion (Misc queries) 4 November 26th 06 10:11 AM
Compound interest Robert Tracey Excel Worksheet Functions 1 November 30th 05 12:27 AM
Problem with compound IF statement Phillycheese5 Excel Worksheet Functions 11 July 18th 05 08:59 PM


All times are GMT +1. The time now is 09:13 AM.

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

About Us

"It's about Microsoft Excel"