Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
wal wal is offline
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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
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
Can I Assign A User Defined Function To A Cell? smartin Excel Worksheet Functions 0 June 28th 09 10:25 PM
Which cell is calling a user-defined function? Randy in Calgary Excel Programming 1 February 11th 08 04:04 PM
User Defined Function - Using Cell Range I need help please Excel Programming 3 May 2nd 07 11:14 PM
Function to give value of a BLANK cell based on another Haz Excel Worksheet Functions 2 July 17th 06 12:57 PM
current cell in user-defined function Julio Kuplinsky Excel Programming 3 December 8th 03 06:24 PM


All times are GMT +1. The time now is 06:11 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"