Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Micayla Bergen
 
Posts: n/a
Default return value from other spreadsheet

i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham
 
Posts: n/a
Default return value from other spreadsheet

Some functions do not work unless the referenced workbook is open. COUNTIF()
is one of those that doesn't. I suggest that you rewrite using the MATCH()
function instead.

The other option is to open up all referenced workbooks and then use Save As
and save as a Workspace instead of individual workbooks. That will insure
that all referenced workbooks are open each time that you open the workspace
in the future.

"Micayla Bergen" wrote:

i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default return value from other spreadsheet

Consistent with the points by JLatham that COUNTIF doesn't work with closed
referenced books, perhaps you could try something like this instead:

=IF(ISNUMBER(MATCH(A4,path_[book1.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A4, path_[book1.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A4,path_[book1.xls]Property & Infrastructure'!$B$10:$B$413,0)),"PI","None")))

Adapt the above to suit the path & name of the referenced workbook ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Micayla Bergen" wrote:
i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you

  #4   Report Post  
Posted to microsoft.public.excel.misc
Micayla Bergen
 
Posts: n/a
Default return value from other spreadsheet

I changed my formula to
=IF(MATCH('C:\Documents and Settings\Gillian Mason\My Documents\[copy 2Share
Recommendations.xls]Stocks'!$B$10:$B$413,A4,0),"S",IF(MATCH('C:\Docume nts and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Income
Securities'!$B$10:$B$413,A4,0),"FI",IF(MATCH('C:\D ocuments and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Property
& Infrastructure'!$B$10:$B$413,A4,0),"PI","None")))
but still have a value error.
:o(

"JLatham" wrote:

Some functions do not work unless the referenced workbook is open. COUNTIF()
is one of those that doesn't. I suggest that you rewrite using the MATCH()
function instead.

The other option is to open up all referenced workbooks and then use Save As
and save as a Workspace instead of individual workbooks. That will insure
that all referenced workbooks are open each time that you open the workspace
in the future.

"Micayla Bergen" wrote:

i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you

  #5   Report Post  
Posted to microsoft.public.excel.misc
Micayla Bergen
 
Posts: n/a
Default return value from other spreadsheet

Thanks Max. i tried that
=IF(ISNUMBER(MATCH(A6,C:\Documents and Settings\Gillian Mason\My
Documents\[copy 2Share
Recommendations.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A6,
C:\Documents and Settings\Gillian Mason\My Documents\[copy 2Share
Recommendations.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A6, C:\Documents and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))
but says there is something wrong w the path, even though i cant see what it
is. is it possible its just the position of my commas and apostrophies?

"Max" wrote:

Consistent with the points by JLatham that COUNTIF doesn't work with closed
referenced books, perhaps you could try something like this instead:

=IF(ISNUMBER(MATCH(A4,path_[book1.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A4, path_[book1.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A4,path_[book1.xls]Property & Infrastructure'!$B$10:$B$413,0)),"PI","None")))

Adapt the above to suit the path & name of the referenced workbook ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Micayla Bergen" wrote:
i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you



  #6   Report Post  
Posted to microsoft.public.excel.misc
JLatham
 
Posts: n/a
Default return value from other spreadsheet

Micayla, If you have cut and pasted the formula into your posting here, I do
not see a leading single quote mark for your references to paths and/or
worksheets.

Any time you have spaces in your path/file/sheet names you need to enclose
everything before the exclamation point in front of the cell range reference
in single quote marks. Two examples, one for an open book, one for same book
closed on a shared drive:
='[Foreign Book.xls]Sheet1'!$B$10:$B$413
='\\Antec\shareddocs\[Foreign Book.xls]Sheet1'!$B$10:$B$413

I also recommend against using spaces, special symbols (like the & symbol)
and such in names. A personal thing, but it generally complicates matters.
I use the underscore symbol to provide spacing like
Property_and_Infrastructure or Income_Securities. I know it isn't as pretty,
but it does alleviate some problems like this can be introduced by them. For
example, the & symbol, if not enclosed in single or double quotes (depending
on the situation) will be interpreted by the system as an attempt to
concatenate two strings, usually with failure in situations like this one.


"Micayla Bergen" wrote:

Thanks Max. i tried that
=IF(ISNUMBER(MATCH(A6,C:\Documents and Settings\Gillian Mason\My
Documents\[copy 2Share
Recommendations.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A6,
C:\Documents and Settings\Gillian Mason\My Documents\[copy 2Share
Recommendations.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A6, C:\Documents and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))
but says there is something wrong w the path, even though i cant see what it
is. is it possible its just the position of my commas and apostrophies?

"Max" wrote:

Consistent with the points by JLatham that COUNTIF doesn't work with closed
referenced books, perhaps you could try something like this instead:

=IF(ISNUMBER(MATCH(A4,path_[book1.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A4, path_[book1.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A4,path_[book1.xls]Property & Infrastructure'!$B$10:$B$413,0)),"PI","None")))

Adapt the above to suit the path & name of the referenced workbook ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Micayla Bergen" wrote:
i have this formula
=IF(COUNTIF(Path/Stocks'!$B$10:$B$413,A4),"S",IF(COUNTIF('Path/Income
securities'!$B$10:$B$413,A4),"FI",IF(COUNTIF('Path/Property &
Infrastructure'!$B$10:$B$413,A4),"PI","None")))
i want S, FI or PI to be returned depending on where the value in A4 is
found, but i get a value message.
Please help.
thank you

  #7   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default return value from other spreadsheet

"Micayla Bergen" wrote:
I changed my formula to: =IF(MATCH(...),..


It won't work this way, Micayla
(besides the syntax mistakes in your change)

We need to use IF(ISNUMBER(MATCH(..)),..
Try it again as per earlier suggestion ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #8   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default return value from other spreadsheet

Perhaps try opening the referenced workbook (eg: book1.xls) first,
then try it as:

=IF(ISNUMBER(MATCH(A4,[book1.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A4, '[book1.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A4,'[book1.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))

Opening the referenced book simultaneously makes it simpler to register the
formula as it "removes" the path from the formula. Leave it to Excel to
insert the path correctly when the referenced book is subsequently closed.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Micayla Bergen" wrote:
Thanks Max. i tried that
=IF(ISNUMBER(MATCH(A6,C:\Documents and Settings\Gillian Mason\My
Documents\[copy 2Share
Recommendations.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A6,
C:\Documents and Settings\Gillian Mason\My Documents\[copy 2Share
Recommendations.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A6, C:\Documents and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))
but says there is something wrong w the path, even though i cant see what it
is. is it possible its just the position of my commas and apostrophies?

  #9   Report Post  
Posted to microsoft.public.excel.misc
JLatham
 
Posts: n/a
Default return value from other spreadsheet

Max, check those single quote marks also - the leading one in the very first
MATCH() formula seems to be missing - needs one right after A4, to pair up
with the one just before the ! in that formula.

"Max" wrote:

Perhaps try opening the referenced workbook (eg: book1.xls) first,
then try it as:

=IF(ISNUMBER(MATCH(A4,[book1.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A4, '[book1.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A4,'[book1.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))

Opening the referenced book simultaneously makes it simpler to register the
formula as it "removes" the path from the formula. Leave it to Excel to
insert the path correctly when the referenced book is subsequently closed.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Micayla Bergen" wrote:
Thanks Max. i tried that
=IF(ISNUMBER(MATCH(A6,C:\Documents and Settings\Gillian Mason\My
Documents\[copy 2Share
Recommendations.xls]Stocks'!$B$10:$B$413,0)),"S",IF(ISNUMBER(MATCH(A6,
C:\Documents and Settings\Gillian Mason\My Documents\[copy 2Share
Recommendations.xls]Income
Securities'!$B$10:$B$413,0)),"FI",IF(ISNUMBER(MATC H(A6, C:\Documents and
Settings\Gillian Mason\My Documents\[copy 2Share Recommendations.xls]Property
& Infrastructure'!$B$10:$B$413,0)),"PI","None")))
but says there is something wrong w the path, even though i cant see what it
is. is it possible its just the position of my commas and apostrophies?

  #10   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default return value from other spreadsheet

"JLatham" wrote:
Max, check those single quote marks also - the leading one in the very first
MATCH() formula seems to be missing - needs one right after A4, to pair up
with the one just before the ! in that formula.


Thanks for correction. Yes, it should be a pair of single quotes for the
sheet: Stocks, or, the single quotes could be removed altogether for Stocks
(as tested here)

This part :
=IF(ISNUMBER(MATCH(A4,[book1.xls]Stocks'!$B$10:$B$413,0)),"S",


should read as:
=IF(ISNUMBER(MATCH(A4,[book1.xls]Stocks!$B$10:$B$413,0)),"S",


--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
Matching and Moving Data From One Spreadsheet to Another? [email protected] Excel Discussion (Misc queries) 1 March 18th 06 02:21 PM
compare two spreadsheets and return a value thumpr Excel Worksheet Functions 1 March 14th 06 10:54 PM
Copy From One Spreadsheet To Another Spreadsheet Copy Excel Discussion (Misc queries) 0 February 15th 06 06:21 PM
Displaying contents of cell on different spreadsheet telewats Excel Discussion (Misc queries) 1 January 26th 06 04:58 PM
Huge problem with "if" formula's [email protected] Excel Discussion (Misc queries) 16 July 20th 05 07:20 PM


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