Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ravi
 
Posts: n/a
Default A SIMPLER FORMULA TO GET A REFERENCE OF WHICH COLUMN IS POPULATED

Hi, need help on for a simpler formula is available if available. The
problem is I have a spreadsheet with many columns and I would like to know
which column is populated, for the moment I'm using the following :

=IF(I150,COLUMN(I15),"")&IF(J150,COLUMN(J15),"") &IF(K150,COLUMN(K15),"")&IF(M150,COLUMN(M15),"") &IF(N150,COLUMN(N15),"")&IF(O150,COLUMN(O15), "")

The values can only be positive.
A simpler version would be appreciated.
Thanks
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=MATCH(9.99999999999999E+307,I15:IV15)+COLUMN(I15)-1

Ravi wrote:
Hi, need help on for a simpler formula is available if available. The
problem is I have a spreadsheet with many columns and I would like to know
which column is populated, for the moment I'm using the following :

=IF(I150,COLUMN(I15),"")&IF(J150,COLUMN(J15),"") &IF(K150,COLUMN(K15),"")&IF(M150,COLUMN(M15),"") &IF(N150,COLUMN(N15),"")&IF(O150,COLUMN(O15), "")

The values can only be positive.
A simpler version would be appreciated.
Thanks


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
  #3   Report Post  
Max
 
Posts: n/a
Default

.. know which column is populated ..

If only a single cell within I15:O15 would be populated at any time,
then this might suffice:

=IF(ISNA(MATCH(TRUE,I15:O15<"",0)),"",MATCH(TRUE, I15:O15<"",0)+8)

Formula to be array-entered, i.e. press CTRL+SHIFT+ENTER
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Ravi" wrote in message
...
Hi, need help on for a simpler formula is available if available. The
problem is I have a spreadsheet with many columns and I would like to know
which column is populated, for the moment I'm using the following :


=IF(I150,COLUMN(I15),"")&IF(J150,COLUMN(J15),"") &IF(K150,COLUMN(K15),"")&
IF(M150,COLUMN(M15),"")&IF(N150,COLUMN(N15),"")& IF(O150,COLUMN(O15),"")

The values can only be positive.
A simpler version would be appreciated.
Thanks



  #4   Report Post  
Ravi
 
Posts: n/a
Default

Thanks, That's great.

This formula works. Just 1 issue I'm getting which is it also picking up
columns with Zeros' (this is a result of a formula) . I wanted to extract
only the positive values. Is there another tweak to it that I need to make.


"Aladin Akyurek" wrote:

=MATCH(9.99999999999999E+307,I15:IV15)+COLUMN(I15)-1

Ravi wrote:
Hi, need help on for a simpler formula is available if available. The
problem is I have a spreadsheet with many columns and I would like to know
which column is populated, for the moment I'm using the following :

=IF(I150,COLUMN(I15),"")&IF(J150,COLUMN(J15),"") &IF(K150,COLUMN(K15),"")&IF(M150,COLUMN(M15),"") &IF(N150,COLUMN(N15),"")&IF(O150,COLUMN(O15), "")

The values can only be positive.
A simpler version would be appreciated.
Thanks


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.

  #5   Report Post  
Max
 
Posts: n/a
Default

Perhaps another play to try in the interim ..

Assuming only a single cell within I15:O15 would evaluate to 0 at any
time, try, array-entered:

=IF(ISNA(MATCH(TRUE,I15:O150,0)),"",MATCH(TRUE,I1 5:O150,0)+8)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




  #6   Report Post  
Ravi
 
Posts: n/a
Default

Thanks guys. That was very useful and successful.

"Max" wrote:

Perhaps another play to try in the interim ..

Assuming only a single cell within I15:O15 would evaluate to 0 at any
time, try, array-entered:

=IF(ISNA(MATCH(TRUE,I15:O150,0)),"",MATCH(TRUE,I1 5:O150,0)+8)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



  #7   Report Post  
Max
 
Posts: n/a
Default

Glad to hear that, Ravi !
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Ravi" wrote in message
...
Thanks guys. That was very useful and successful.



  #8   Report Post  
Krishnakumar
 
Posts: n/a
Default


Hi Ravi,

Try this array formula,

=MAX(IF(ISNUMBER(I15:O15)*(I15:O15<0),COLUMN(I15: O15)))

HTH


--
Krishnakumar


------------------------------------------------------------------------
Krishnakumar's Profile: http://www.excelforum.com/member.php...o&userid=20138
View this thread: http://www.excelforum.com/showthread...hreadid=387439

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
cell reference in a formula is called ??????????? Excel Discussion (Misc queries) 2 April 22nd 23 09:02 AM
Using a formula to create named range reference [email protected] Excel Worksheet Functions 4 June 29th 05 08:03 PM
reference a repeating cell in a formula Tafe Riller Excel Worksheet Functions 1 February 17th 05 03:20 PM
formula to return the value of a cell based on a looked up true reference sarah Excel Worksheet Functions 2 February 2nd 05 08:15 PM
Look Up and Cell Reference - Formula Help Needed Janine Excel Worksheet Functions 1 December 14th 04 04:01 PM


All times are GMT +1. The time now is 06:11 AM.

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"