Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compound If, And Or - can | Excel Discussion (Misc queries) | |||
How do I write a compound if statement? | Excel Worksheet Functions | |||
compound | Excel Discussion (Misc queries) | |||
Compound interest | Excel Worksheet Functions | |||
Problem with compound IF statement | Excel Worksheet Functions |