LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default IF, INDIRECT, & Wild cards

I have the following formula in a worksheet cell that captures data from
another worksheet:

=IF(INDIRECT("'"&$T$1&"'!" & "h"&$N37) = "*U*", INDIRECT("'"&$T$1&"'!" &
"h"&$N37), VALUE(INDIRECT("'"&$T$1&"'!" & "h"&$N37)))

This works great if there is no "U" in the referred to cell because a number
is returned but if there is a "U" in the referred to cell, #VALUE! is
returned!

If I just use =INDIRECT("'"&$T$1&"'!" & "h"&$N37), it works fine whether
there is a "U" or not in the referred to cell, e.g., 10U will be returned but
a 50 will be returned as text and I need a number if there is no "U". Hence,
my need for the IF statement. The referred to cells come from an Access
database query where I had to combine two fields to create one field for
Excel.

Does anyone have an idea of what I may be doing wrong?

TIA
--
javablood
 
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
EXCEL Wild Cards NPVSRUS New Users to Excel 2 July 7th 08 10:26 PM
Wild Cards with IF stmt KarenF Excel Worksheet Functions 5 August 3rd 07 11:07 PM
wild cards? ferde Excel Discussion (Misc queries) 3 May 26th 07 06:28 AM
wild cards in SUMIF charles Excel Worksheet Functions 2 October 17th 06 10:29 PM
If Statement Using Wild Cards Jasmine Excel Worksheet Functions 5 August 23rd 05 10:38 AM


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