Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default use data in cell as a formula for another cell

Hi
I have in cell a1 = 2007 and a2 = 2008 and then I wish to input the results
of a lookup to another file which uses the data from ColA eg
COUNTIF([2008_04_apr_Creation.xls]Sheet4!$Y:$Y,"#N/A") I need to change 2008
to 2007.
Thanks for any help, or ideas, Noel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default use data in cell as a formula for another cell

Have a look at the "indirect" function in help.

COUNTIF(INDIRECT("[" & A1 & "_04_apr_Creation.xls]Sheet4!$Y:$Y"),"#N/
A")

hth
Carlo

NoelH wrote:
Hi
I have in cell a1 = 2007 and a2 = 2008 and then I wish to input the results
of a lookup to another file which uses the data from ColA eg
COUNTIF([2008_04_apr_Creation.xls]Sheet4!$Y:$Y,"#N/A") I need to change 2008
to 2007.
Thanks for any help, or ideas, Noel

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default use data in cell as a formula for another cell

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/

That includes =indirect.ext() that may help you.


NoelH wrote:

Hi
I have in cell a1 = 2007 and a2 = 2008 and then I wish to input the results
of a lookup to another file which uses the data from ColA eg
COUNTIF([2008_04_apr_Creation.xls]Sheet4!$Y:$Y,"#N/A") I need to change 2008
to 2007.
Thanks for any help, or ideas, Noel


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default use data in cell as a formula for another cell

ps. =countif() won't work with a closed workbook, either.

But there are workarounds for that, too--using =sumproduct() is one alternative.

NoelH wrote:

Hi
I have in cell a1 = 2007 and a2 = 2008 and then I wish to input the results
of a lookup to another file which uses the data from ColA eg
COUNTIF([2008_04_apr_Creation.xls]Sheet4!$Y:$Y,"#N/A") I need to change 2008
to 2007.
Thanks for any help, or ideas, Noel


--

Dave Peterson
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
formula to lookup data in cell NEXT to another cell TraderXL Excel Worksheet Functions 3 June 22nd 09 01:44 PM
how to extract data from a cell in a formula in another cell vidhya Excel Worksheet Functions 1 October 17th 05 04:31 PM
data validation to restrict input in cell based on value of cell above that cell NC Excel Programming 2 January 25th 05 07:11 AM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 10:09 PM.

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"