Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User-defined function to give blank cell?
Excel 2003
I have a spreadsheet function that looks something like this: =IF(OR(RangeA=0,RangeA=""),"",IF(RangeA-15000<=0,"",RangeA-15000)) I need to add more conditions, so I'm trying to write a user-defined VBA function. What code (if any) can be included in such a function to get the first result shown above, i.e., a blank cell (symbolized by "" in a worksheet function) under certain conditions? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User-defined function to give blank cell?
Same as a worksheet function, a zero-length string ("") although some
developers use vbNullString. They are slightly different internally but for your purposes they should be functionally similar. Rob Bovey explains the difference: http://www.dailydoseofexcel.com/arch...-cells-in-vba/ And a little more info: XL2000: How to Use Visual Basic Constants in Text Strings http://support.microsoft.com/kb/211774/en-us -- Tim Zych www.higherdata.com Compare data in Excel and find differences with Workbook Compare A free, powerful, flexible Excel utility "wal" wrote in message ... Excel 2003 I have a spreadsheet function that looks something like this: =IF(OR(RangeA=0,RangeA=""),"",IF(RangeA-15000<=0,"",RangeA-15000)) I need to add more conditions, so I'm trying to write a user-defined VBA function. What code (if any) can be included in such a function to get the first result shown above, i.e., a blank cell (symbolized by "" in a worksheet function) under certain conditions? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I Assign A User Defined Function To A Cell? | Excel Worksheet Functions | |||
Which cell is calling a user-defined function? | Excel Programming | |||
User Defined Function - Using Cell Range | Excel Programming | |||
Function to give value of a BLANK cell based on another | Excel Worksheet Functions | |||
current cell in user-defined function | Excel Programming |