Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Copying a formula containing the INDIRECT function

Dear All

I have the following formula in cell B4:

=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))

It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.

I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Copying a formula containing the INDIRECT function

If N/A is found in cell B16 of that worksheet then
N/A appears in the cell where the formula is written,
if not the contents of B16 of that worksheet appear instead.
=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))


You don't need the IF function.

Assume you enter the first formula in cell A1:

=INDEX(INDIRECT("'"&$A4&"'!B16:IV16"),COLUMNS($A1: A1))

Copy across as needed.

--
Biff
Microsoft Excel MVP


"Pelham" wrote in message
...
Dear All

I have the following formula in cell B4:

=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))

It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.

I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Copying a formula containing the INDIRECT function

Hi,

Try this:

=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Pelham" wrote:

Dear All

I have the following formula in cell B4:

=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))

It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.

I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Copying a formula containing the INDIRECT function

=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))

If you're going to use the ADDRESS function:

=INDIRECT(ADDRESS(16,COLUMN(B1),,,$A4))

I would not use COLUMN(B1).

=INDIRECT(ADDRESS(16,COLUMNS($A1:B1),,,$A4))

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in
message ...
Hi,

Try this:

=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Pelham" wrote:

Dear All

I have the following formula in cell B4:

=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))

It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.

I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copying a formula containing the INDIRECT function

Top posting WITH a sig is SO lame.

I have had good success with simply using the search and replace tools
in notepad when drag style formula copying fails.

A columnar paste from notepad goes in just fine.

It works well when excel wants to auto-morph more figures than the user
wants it to on a drag copy operation.


On Sat, 29 Aug 2009 22:59:55 -0400, "T. Valko"
wrote:

=INDIRECT(ADDRESS(16,COLUMNS($A1:B1),,,$A4))

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in
message ...
Hi,

Try this:

=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Pelham" wrote:

Dear All

I have the following formula in cell B4:

=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))

It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.

I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Copying a formula containing the INDIRECT function

On Aug 30, 3:02*am, Shane Devenshire
wrote:
Hi,

Try this:

=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire



"Pelham" wrote:
Dear All


I have the following formula in cell B4:


=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))


It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.


I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?- Hide quoted text -


- Show quoted text -


Brilliant, Shane - thank you!
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Copying a formula containing the INDIRECT function

On Aug 30, 11:59*am, "T. Valko" wrote:
=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))


If you're going to use the ADDRESS function:

=INDIRECT(ADDRESS(16,COLUMN(B1),,,$A4))

I would not use COLUMN(B1).

=INDIRECT(ADDRESS(16,COLUMNS($A1:B1),,,$A4))

--
Biff
Microsoft Excel MVP

"Shane Devenshire" wrote in
...



Hi,


Try this:


=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))


--
If this helps, please click the Yes button.


Cheers,
Shane Devenshire


"Pelham" wrote:


Dear All


I have the following formula in cell B4:


=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))


It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.


I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?- Hide quoted text -


- Show quoted text -


Thank you Biff - terrific! How on earth do you know this stuff so
easily?!?
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Copying a formula containing the INDIRECT function

How on earth do you know this stuff so easily?!?

I do this stuff every day, all day!

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Pelham" wrote in message
...
On Aug 30, 11:59 am, "T. Valko" wrote:
=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))


If you're going to use the ADDRESS function:

=INDIRECT(ADDRESS(16,COLUMN(B1),,,$A4))

I would not use COLUMN(B1).

=INDIRECT(ADDRESS(16,COLUMNS($A1:B1),,,$A4))

--
Biff
Microsoft Excel MVP

"Shane Devenshire" wrote in
...



Hi,


Try this:


=INDIRECT("'"&$A4&"'!"&ADDRESS(16,COLUMN(B1)))


--
If this helps, please click the Yes button.


Cheers,
Shane Devenshire


"Pelham" wrote:


Dear All


I have the following formula in cell B4:


=IF(INDIRECT("'"&$A4&"'!B$16")="N/A","N/A",INDIRECT("'"&$A4&"'!B$16"))


It refers to cell B16 in a worksheet where the name of that worksheet
is in cell A4. If N/A is found in cell B16 of that worksheet then N/A
appears in the cell where the formula is written, if not the contents
of B16 of that worksheet appear instead.


I want to drag this formula across to the right of my worksheet (to
cells C4, D4 etc) and I need the B16 to change to C16, D16 etc
accordingly. How do I modify formula so that B16 changes accordingly,
please?- Hide quoted text -


- Show quoted text -


Thank you Biff - terrific! How on earth do you know this stuff so
easily?!?


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
Name of named formula used in an INDIRECT function Werner Rohrmoser Excel Worksheet Functions 4 August 21st 08 11:19 AM
Copying a formula which uses indirect() BarryL Excel Worksheet Functions 5 July 26th 07 05:15 PM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
Can INDIRECT function reference a cell that contains a formula Steve E Excel Worksheet Functions 13 August 23rd 06 10:49 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM


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