LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Generating a cell reference within a formula

The =concatenate() function serves the same purpose as the & operator. But you
don't need both:

=IF(INDIRECT("'"&A6&"'!B2")<0,INDIRECT("'"&A6&"'! B2"),"")
or
=IF(INDIRECT(CONCATENATE("'",A6,"'!B2"))<0,
INDIRECT(CONCATENATE("'",A6,"'!B2")),"")

(two lines to avoid line wrap in the post.)

Tom Hutchins wrote:

Use the INDIRECT function twice:

=IF(INDIRECT(CONCATENATE("'"&A6&"'!B2"))<0,INDIRE CT(CONCATENATE("'"&A6&"'!B2")),"")

Hutch

"Todd S" wrote:

Thanks Tom, that worked well! However, now when the result is false, it
returns "0.00" rather than "". Suggestions?


"Tom Hutchins" wrote:

Use the INDIRECT function to make Excel treat the concatenated text as an
address:

=IF(CONCATENATE("'"&A6&"'!B2")<0,INDIRECT(CONCATE NATE("'"&A6&"'!B2")),"")

Hope this helps,

Hutch

"Todd S" wrote:

How do you generate a reference to a cell in another worksheet based on the
contents of a cell in the current worksheet.

Here is what I have been trying. Logically it works. But when true, it
returns the text that I am concatenating rather then the value of the cell
that I am referencing.

Cell A6 = January, 2008

=IF(CONCATENATE("'"&A6&"'!B2")<0,CONCATENATE("'"& A6&"'!B2"),"")


--

Dave Peterson
 
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
Need Help Generating a Specific Formula Gene Cocchi Excel Worksheet Functions 4 September 27th 07 08:29 PM
Looking for help generating list numbers with reference Excl Excel Worksheet Functions 1 August 22nd 06 08:05 PM
Using a cell reference within a cell reference in a formula david Excel Worksheet Functions 2 July 1st 06 01:05 PM
My cell formula is generating an unwanted e-mail message. Rita Major Excel Worksheet Functions 4 October 15th 05 12:23 AM
Need help with generating a formula PLSE. kielp Excel Discussion (Misc queries) 0 March 30th 05 03:49 PM


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