LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Code to Assist with Nested Function, Also Using ISERROR

Thanks; this might work - will give it a try!

"Excelenator" wrote:


According to your last question you could change the line after the
"xIndexErr:" to read "xIndex = "" " or "xIndex = 0" . This will make
the function return a blank or zero instead of an error message. I'm
not sure if that will help or hurt your formula.


Paige Wrote:

Public Function xIndex(vRange, vRowVal, vColVal)
On Error GoTo xIndexErr
Application.Volatile
With Application.WorksheetFunction
xIndex = .Index(vRange, .Match(vColVal, vRange.Columns(1), 0),
..Match(vRowVal, vRange.Rows(1), 0))
End With
Exit Function
xIndexErr:
xIndex = CVErr(Err)
End Function

.....

Is there a way to adjust the VB code for the function so that if the
formula
returns an error message, the cell shows blank? Or is there a better
way to
do this? Thanks for any thoughts/suggestions.



--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=565399


 
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
iserror and ifs nested formulas Vicki Excel Worksheet Functions 4 June 4th 10 09:34 PM
nested formulas in excel using iserror and if Vicki Excel Discussion (Misc queries) 2 June 4th 10 08:13 PM
nested IF(ISERROR()) statement DC Excel Discussion (Misc queries) 13 May 31st 07 01:28 PM
Iserror nested within a conditional vlookup Dale Excel Worksheet Functions 3 January 5th 07 10:40 PM
Help: Nested If/And Function formula to VB code RAP Excel Programming 2 August 9th 05 05:39 AM


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