Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Darren Oakey
 
Posts: n/a
Default Three new functions that should be part of your standard set

Why aren't these functions built into Excel? It would simplify SOOO many
spreadsheets:

'
' If the value is blank, return the blankvalue,
' otherwise return the value
'
Public Function IfBlank(ByVal value As Variant, ByVal blankValue As Variant)
As Variant
If IsEmpty(value) Or (value = "") Then
IfBlank = blankValue
Else
IfBlank = value
End If
End Function

'
' If the value is valid, return the value, otherwise just return blank
'
Public Function IfValid(ByVal value As Variant) As Variant
If IsError(value) Then
IfValid = ""
Else
IfValid = value
End If
End Function

'
' If the value is in error, return the other value
'
Public Function IfError(ByVal value As Variant, ByVal valueIfError As
Variant) As Variant
If IsError(value) Then
IfError = valueIfError
Else
IfError = value
End If
End Function


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Three new functions that should be part of your standard set

IFERROR is a new function for the next version of Excel

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Darren Oakey" <Darren wrote in message
...
Why aren't these functions built into Excel? It would simplify SOOO many
spreadsheets:

'
' If the value is blank, return the blankvalue,
' otherwise return the value
'
Public Function IfBlank(ByVal value As Variant, ByVal blankValue As
Variant)
As Variant
If IsEmpty(value) Or (value = "") Then
IfBlank = blankValue
Else
IfBlank = value
End If
End Function

'
' If the value is valid, return the value, otherwise just return blank
'
Public Function IfValid(ByVal value As Variant) As Variant
If IsError(value) Then
IfValid = ""
Else
IfValid = value
End If
End Function

'
' If the value is in error, return the other value
'
Public Function IfError(ByVal value As Variant, ByVal valueIfError As
Variant) As Variant
If IsError(value) Then
IfError = valueIfError
Else
IfError = value
End If
End Function


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default Three new functions that should be part of your standard set

I don't think I follow. What's wrong with

=IF(value="",blankvalue,value)
=IF(ISERR(value),"",value)
=IF(ISERR(value),valueiferror,value)

Or, in VBA using the IIF function?


"Darren Oakey" wrote:

Why aren't these functions built into Excel? It would simplify SOOO many
spreadsheets:

'
' If the value is blank, return the blankvalue,
' otherwise return the value
'
Public Function IfBlank(ByVal value As Variant, ByVal blankValue As Variant)
As Variant
If IsEmpty(value) Or (value = "") Then
IfBlank = blankValue
Else
IfBlank = value
End If
End Function

'
' If the value is valid, return the value, otherwise just return blank
'
Public Function IfValid(ByVal value As Variant) As Variant
If IsError(value) Then
IfValid = ""
Else
IfValid = value
End If
End Function

'
' If the value is in error, return the other value
'
Public Function IfError(ByVal value As Variant, ByVal valueIfError As
Variant) As Variant
If IsError(value) Then
IfError = valueIfError
Else
IfError = value
End If
End Function


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Three new functions that should be part of your standard set

For instance the IFERROR function works like this

=IFERROR(VLOOKUP(A2,B2:C50,2,0),"")

whereas now you need to use something like

=IF(ISNA(VLOOKUP(A2,B2:C50,2,0)),"",VLOOKUP(A2,B2: C50,2,0))


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"JMB" wrote in message
...
I don't think I follow. What's wrong with

=IF(value="",blankvalue,value)
=IF(ISERR(value),"",value)
=IF(ISERR(value),valueiferror,value)

Or, in VBA using the IIF function?


"Darren Oakey" wrote:

Why aren't these functions built into Excel? It would simplify SOOO many
spreadsheets:

'
' If the value is blank, return the blankvalue,
' otherwise return the value
'
Public Function IfBlank(ByVal value As Variant, ByVal blankValue As
Variant)
As Variant
If IsEmpty(value) Or (value = "") Then
IfBlank = blankValue
Else
IfBlank = value
End If
End Function

'
' If the value is valid, return the value, otherwise just return blank
'
Public Function IfValid(ByVal value As Variant) As Variant
If IsError(value) Then
IfValid = ""
Else
IfValid = value
End If
End Function

'
' If the value is in error, return the other value
'
Public Function IfError(ByVal value As Variant, ByVal valueIfError As
Variant) As Variant
If IsError(value) Then
IfError = valueIfError
Else
IfError = value
End If
End Function


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default Three new functions that should be part of your standard set

Ahhh, I see. That would be useful.

"Peo Sjoblom" wrote:

For instance the IFERROR function works like this

=IFERROR(VLOOKUP(A2,B2:C50,2,0),"")

whereas now you need to use something like

=IF(ISNA(VLOOKUP(A2,B2:C50,2,0)),"",VLOOKUP(A2,B2: C50,2,0))


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"JMB" wrote in message
...
I don't think I follow. What's wrong with

=IF(value="",blankvalue,value)
=IF(ISERR(value),"",value)
=IF(ISERR(value),valueiferror,value)

Or, in VBA using the IIF function?


"Darren Oakey" wrote:

Why aren't these functions built into Excel? It would simplify SOOO many
spreadsheets:

'
' If the value is blank, return the blankvalue,
' otherwise return the value
'
Public Function IfBlank(ByVal value As Variant, ByVal blankValue As
Variant)
As Variant
If IsEmpty(value) Or (value = "") Then
IfBlank = blankValue
Else
IfBlank = value
End If
End Function

'
' If the value is valid, return the value, otherwise just return blank
'
Public Function IfValid(ByVal value As Variant) As Variant
If IsError(value) Then
IfValid = ""
Else
IfValid = value
End If
End Function

'
' If the value is in error, return the other value
'
Public Function IfError(ByVal value As Variant, ByVal valueIfError As
Variant) As Variant
If IsError(value) Then
IfError = valueIfError
Else
IfError = value
End If
End Function


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the
"I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and
then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions




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
Date Functions in Excel Paul Excel Worksheet Functions 1 May 8th 06 01:57 AM
3 questions about automated c++ com add-in worksheet functions gert Excel Worksheet Functions 0 March 10th 05 09:57 AM
Part Number/Qty Consolidations [email protected] Excel Discussion (Misc queries) 2 February 6th 05 09:21 PM
# of Functions per cell SUB-ZERO Excel Worksheet Functions 3 January 23rd 05 10:35 PM
PivotTable canned functions doco Excel Discussion (Misc queries) 0 January 14th 05 03:52 PM


All times are GMT +1. The time now is 03:50 AM.

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"