Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nm Nm is offline
external usenet poster
 
Posts: 9
Default IF formula - positioning difference

Hi

Following is my issue:

I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.

I have following data in it (sample)

854000A13A0099002
854000A13AV031004

When I put the following formula in A1
=IF(Data_10,"yes","")

it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).

I am sure I am missing something very small but I cant figure it out.

If someone could please tell me what may be the reason.

Thanks,
Naeem

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default IF formula - positioning difference

It is because it is an array of data, and if you try to address an array
like that, you have to be in the same relative rows.

Try starting with

=IF(INDEX(Data_1,ROW(A1))0,"yes","")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Nm" wrote in message
ps.com...
Hi

Following is my issue:

I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.

I have following data in it (sample)

854000A13A0099002
854000A13AV031004

When I put the following formula in A1
=IF(Data_10,"yes","")

it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).

I am sure I am missing something very small but I cant figure it out.

If someone could please tell me what may be the reason.

Thanks,
Naeem



  #3   Report Post  
Posted to microsoft.public.excel.programming
Nm Nm is offline
external usenet poster
 
Posts: 9
Default IF formula - positioning difference

On Jul 10, 10:10 am, "Bob Phillips" wrote:
It is because it is an array of data, and if you try to address an array
like that, you have to be in the same relative rows.

Try starting with

=IF(INDEX(Data_1,ROW(A1))0,"yes","")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Nm" wrote in message

ps.com...



Hi


Following is my issue:


I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.


I have following data in it (sample)


854000A13A0099002
854000A13AV031004


When I put the following formula in A1
=IF(Data_10,"yes","")


it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).


I am sure I am missing something very small but I cant figure it out.


If someone could please tell me what may be the reason.


Thanks,
Naeem- Hide quoted text -


- Show quoted text -


Thanks Bob, It worked....but could you please explain what does the
INDEX in the formula is doing ? Is it just considering ROW 1 in the
formula ?

Thanks,
Naeem

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default IF formula - positioning difference

Basically it is INDEXing into the array, using the ROW number as the index.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Nm" wrote in message
oups.com...
On Jul 10, 10:10 am, "Bob Phillips" wrote:
It is because it is an array of data, and if you try to address an array
like that, you have to be in the same relative rows.

Try starting with

=IF(INDEX(Data_1,ROW(A1))0,"yes","")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Nm" wrote in message

ps.com...



Hi


Following is my issue:


I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.


I have following data in it (sample)


854000A13A0099002
854000A13AV031004


When I put the following formula in A1
=IF(Data_10,"yes","")


it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).


I am sure I am missing something very small but I cant figure it out.


If someone could please tell me what may be the reason.


Thanks,
Naeem- Hide quoted text -


- Show quoted text -


Thanks Bob, It worked....but could you please explain what does the
INDEX in the formula is doing ? Is it just considering ROW 1 in the
formula ?

Thanks,
Naeem



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default IF formula - positioning difference

row(A1) returns 1. When you copy it down one cell, it becomes row(A2) and
then it returns 2.

This is used as the first argument of the index function. The index
function takes a range of cells as its first argument. The second argument
is a one based index value in to the rows of that range and the third
argument is a one based index in to the columns of that range. so

=Index($M$11:$Q$20,2,5) would be the cell in the second row of the range
and the 5th column; so it would be Q12 and it would return the value found
in Q12.

Using the row funtion to determine the row of interest, you can see that the
formula refers to the upper left corner of the Data_1 range only when the
second argument is Row(A1), when it is Row(A2) it refers to the second row
of the Data_1 range. The use of A1 is just to use an address that will
return the number 1 when used as the argument to row. $IV1 would work as
well.

--
Regards,
Tom Ogilvy


"Nm" wrote:

On Jul 10, 10:10 am, "Bob Phillips" wrote:
It is because it is an array of data, and if you try to address an array
like that, you have to be in the same relative rows.

Try starting with

=IF(INDEX(Data_1,ROW(A1))0,"yes","")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Nm" wrote in message

ps.com...



Hi


Following is my issue:


I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.


I have following data in it (sample)


854000A13A0099002
854000A13AV031004


When I put the following formula in A1
=IF(Data_10,"yes","")


it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).


I am sure I am missing something very small but I cant figure it out.


If someone could please tell me what may be the reason.


Thanks,
Naeem- Hide quoted text -


- Show quoted text -


Thanks Bob, It worked....but could you please explain what does the
INDEX in the formula is doing ? Is it just considering ROW 1 in the
formula ?

Thanks,
Naeem




  #6   Report Post  
Posted to microsoft.public.excel.programming
Nm Nm is offline
external usenet poster
 
Posts: 9
Default IF formula - positioning difference

On Jul 10, 11:04 am, Tom Ogilvy
wrote:
row(A1) returns 1. When you copy it down one cell, it becomes row(A2) and
then it returns 2.

This is used as the first argument of the index function. The index
function takes a range of cells as its first argument. The second argument
is a one based index value in to the rows of that range and the third
argument is a one based index in to the columns of that range. so

=Index($M$11:$Q$20,2,5) would be the cell in the second row of the range
and the 5th column; so it would be Q12 and it would return the value found
in Q12.

Using the row funtion to determine the row of interest, you can see that the
formula refers to the upper left corner of the Data_1 range only when the
second argument is Row(A1), when it is Row(A2) it refers to the second row
of the Data_1 range. The use of A1 is just to use an address that will
return the number 1 when used as the argument to row. $IV1 would work as
well.

--
Regards,
Tom Ogilvy



"Nm" wrote:
On Jul 10, 10:10 am, "Bob Phillips" wrote:
It is because it is an array of data, and if you try to address an array
like that, you have to be in the same relative rows.


Try starting with


=IF(INDEX(Data_1,ROW(A1))0,"yes","")


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Nm" wrote in message


ups.com...


Hi


Following is my issue:


I have 1 column of data and I have named the range
$A$2:$A$30 as Data_1.


I have following data in it (sample)


854000A13A0099002
854000A13AV031004


When I put the following formula in A1
=IF(Data_10,"yes","")


it gives me #VALUE as result but when I put it anywhere infront of Row
2 to Row 30 it works (any column).


I am sure I am missing something very small but I cant figure it out.


If someone could please tell me what may be the reason.


Thanks,
Naeem- Hide quoted text -


- Show quoted text -


Thanks Bob, It worked....but could you please explain what does the
INDEX in the formula is doing ? Is it just considering ROW 1 in the
formula ?


Thanks,
Naeem- Hide quoted text -


- Show quoted text -


Thanks Tom for explaining it in detail.

Naeem

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
date difference formula Scott_goddard Charts and Charting in Excel 1 November 30th 06 11:50 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Programming 0 January 6th 06 12:59 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Programming 0 January 5th 06 04:22 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM


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