Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default DATA FROM ANOTHER WORKSHEET

I have this formula that I am using to pull data data worksheet NSN8. No
problems.

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",IF(COUNTIF(NSN8!A:A,D1088),INDEX(NSN8!C:C,MATCH (D1088,NSN8!A:A,0))))

I have created another worksheet NSN09 and started to pull that data in the
next row:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",IF(COUNTIF(NSN09!A:A,D1089),INDEX(NSN09!C:C,MAT CH(D1089,NSN09!A:A,0))))

Instead of receiving data from worksheet NSN09, I am getting error #N/A.

Why is this?

Thanks,

Roy


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default DATA FROM ANOTHER WORKSHEET

First, you're checking that countif twice. The second time has to be true
since, you're in the "else" portion of the formula:

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

But I'm guessing that the difference is in the way =countif() works.
=countif(a:a,1) and =countif(a:a,"1") will return the same number.

=Countif() wants a string in that second argument and will treat numbers stored
as text and real numbers the same.

So if you're matching on numbers, then this could be the problem.

I'd eschew the =countif() and use =match() to test for an, er, match.

=IF(iserror(match(d1088,nsn8!a:a,0)),"N/A",
INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

So are you matching up on numbers?????

roy.okinawa wrote:

I have this formula that I am using to pull data data worksheet NSN8. No
problems.

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",IF(COUNTIF(NSN8!A:A,D1088),INDEX(NSN8!C:C,MATCH (D1088,NSN8!A:A,0))))

I have created another worksheet NSN09 and started to pull that data in the
next row:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",IF(COUNTIF(NSN09!A:A,D1089),INDEX(NSN09!C:C,MAT CH(D1089,NSN09!A:A,0))))

Instead of receiving data from worksheet NSN09, I am getting error #N/A.

Why is this?

Thanks,

Roy


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default DATA FROM ANOTHER WORKSHEET

The first formula with NSN8 works fine. It is when I try to replicate the
formula using NSN09 I get the #N/A error.


"Dave Peterson" wrote:

First, you're checking that countif twice. The second time has to be true
since, you're in the "else" portion of the formula:

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

But I'm guessing that the difference is in the way =countif() works.
=countif(a:a,1) and =countif(a:a,"1") will return the same number.

=Countif() wants a string in that second argument and will treat numbers stored
as text and real numbers the same.

So if you're matching on numbers, then this could be the problem.

I'd eschew the =countif() and use =match() to test for an, er, match.

=IF(iserror(match(d1088,nsn8!a:a,0)),"N/A",
INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

So are you matching up on numbers?????

roy.okinawa wrote:

I have this formula that I am using to pull data data worksheet NSN8. No
problems.

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",IF(COUNTIF(NSN8!A:A,D1088),INDEX(NSN8!C:C,MATCH (D1088,NSN8!A:A,0))))

I have created another worksheet NSN09 and started to pull that data in the
next row:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",IF(COUNTIF(NSN09!A:A,D1089),INDEX(NSN09!C:C,MAT CH(D1089,NSN09!A:A,0))))

Instead of receiving data from worksheet NSN09, I am getting error #N/A.

Why is this?

Thanks,

Roy


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default DATA FROM ANOTHER WORKSHEET

I am getting error #N/A.

Don't know why you're getting that result. Your COUNTIF's should eliminate a
"no match" error condition. However, your COUNTIF's are redundant. You can
eliminate the 2nd one:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",INDEX(NSN09!C:C,MATCH(D1089,NSN09!A:A,0)))

A possibility is that COUNTIF and MATCH will evaluate things differently.
For example:

D1089 = numeric 10
NSN09 A1 = text 10

COUNTIF will evaluate those as equal but MATCH won't causing the #N/A.

Biff

"roy.okinawa" wrote in message
...
I have this formula that I am using to pull data data worksheet NSN8. No
problems.

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",IF(COUNTIF(NSN8!A:A,D1088),INDEX(NSN8!C:C,MATCH (D1088,NSN8!A:A,0))))

I have created another worksheet NSN09 and started to pull that data in
the
next row:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",IF(COUNTIF(NSN09!A:A,D1089),INDEX(NSN09!C:C,MAT CH(D1089,NSN09!A:A,0))))

Instead of receiving data from worksheet NSN09, I am getting error #N/A.

Why is this?

Thanks,

Roy




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default DATA FROM ANOTHER WORKSHEET

Are you trying to match a number with a string -- or a string with a number?

In either case, did the alternative suggestion work ok?

roy.okinawa wrote:

The first formula with NSN8 works fine. It is when I try to replicate the
formula using NSN09 I get the #N/A error.

"Dave Peterson" wrote:

First, you're checking that countif twice. The second time has to be true
since, you're in the "else" portion of the formula:

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

But I'm guessing that the difference is in the way =countif() works.
=countif(a:a,1) and =countif(a:a,"1") will return the same number.

=Countif() wants a string in that second argument and will treat numbers stored
as text and real numbers the same.

So if you're matching on numbers, then this could be the problem.

I'd eschew the =countif() and use =match() to test for an, er, match.

=IF(iserror(match(d1088,nsn8!a:a,0)),"N/A",
INDEX(NSN8!C:C,MATCH(D1088,NSN8!A:A,0)))

So are you matching up on numbers?????

roy.okinawa wrote:

I have this formula that I am using to pull data data worksheet NSN8. No
problems.

=IF(COUNTIF(NSN8!A:A,D1088)=0,"N/A",IF(COUNTIF(NSN8!A:A,D1088),INDEX(NSN8!C:C,MATCH (D1088,NSN8!A:A,0))))

I have created another worksheet NSN09 and started to pull that data in the
next row:

=IF(COUNTIF(NSN09!A:A,D1089)=0,"N/A",IF(COUNTIF(NSN09!A:A,D1089),INDEX(NSN09!C:C,MAT CH(D1089,NSN09!A:A,0))))

Instead of receiving data from worksheet NSN09, I am getting error #N/A.

Why is this?

Thanks,

Roy


--

Dave Peterson


--

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
taking certian data from worksheet one to worksheet 2 [email protected] Excel Worksheet Functions 1 September 12th 06 09:01 AM
Using a Worksheet Form to add data to a separate worksheet databas Rawblyn Excel Worksheet Functions 3 March 7th 06 08:17 PM
Using a column of data from 1 worksheet to extract data from another worksheet [email protected] Excel Worksheet Functions 2 February 23rd 06 04:33 PM
importing data from Excel worksheet to another worksheet jbrick Excel Worksheet Functions 0 August 11th 05 05:51 PM
Automatically pasting worksheet data to new worksheet with formulas COntactJason Excel Worksheet Functions 0 August 10th 05 08:22 PM


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