Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Avi Avi is offline
external usenet poster
 
Posts: 29
Default Help in calculating # of columns dynamically

Hi,

Assume I have Y # cells of data in row X. (i am using x and y because
i am calculating it dynamically using Offset and Match)

I want to calculate Y in in the cell B9 with the formula
=COUNTA(MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6))
~ this does not work and returns the value 1

however if I put the Formula
=MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6) in Cell
C10 and the Formula
= Counta(Indirect (C10) in the Cell B10
~ it works fine and returns the # of columns in the matching row.

Can someone help me in finding, why it is happening, is there a way to
calculate the # of columns by using one formula only.

Thanks,
Avinash

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Help in calculating # of columns dynamically

Avinash,

Try:

=COUNTA(INDIRECT(MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6)))


--
Hope that helps.

Vergel Adriano


"Avi" wrote:

Hi,

Assume I have Y # cells of data in row X. (i am using x and y because
i am calculating it dynamically using Offset and Match)

I want to calculate Y in in the cell B9 with the formula
=COUNTA(MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6))
~ this does not work and returns the value 1

however if I put the Formula
=MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6) in Cell
C10 and the Formula
= Counta(Indirect (C10) in the Cell B10
~ it works fine and returns the # of columns in the matching row.

Can someone help me in finding, why it is happening, is there a way to
calculate the # of columns by using one formula only.

Thanks,
Avinash


  #3   Report Post  
Posted to microsoft.public.excel.programming
Avi Avi is offline
external usenet poster
 
Posts: 29
Default Help in calculating # of columns dynamically

Yes, It did work.. How did I miss it :(

On Aug 9, 5:30 pm, Vergel Adriano
wrote:
Avinash,

Try:

=COUNTA(INDIRECT(MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6)))

--
Hope that helps.

Vergel Adriano

"Avi" wrote:
Hi,


Assume I have Y # cells of data in row X. (i am using x and y because
i am calculating it dynamically using Offset and Match)


I want to calculate Y in in the cell B9 with the formula
=COUNTA(MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6))
~ this does not work and returns the value 1


however if I put the Formula
=MATCH(Data!A9,Data!A1:A6) & ":" & MATCH(Data!A9,Data!A1:A6) in Cell
C10 and the Formula
= Counta(Indirect (C10) in the Cell B10
~ it works fine and returns the # of columns in the matching row.


Can someone help me in finding, why it is happening, is there a way to
calculate the # of columns by using one formula only.


Thanks,
Avinash



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
Excel 2000 formula to dynamically sum adjacent rows and columns whererows inserted/deleted sga[_2_] Excel Worksheet Functions 3 April 12th 11 01:23 PM
Excel 2000: Dynamically Generating Data Driven Sheet Columns Kermit Piper Excel Programming 0 November 2nd 06 08:17 AM
Sum columns dynamically Delboy Excel Worksheet Functions 1 July 28th 06 03:33 PM
Dynamically Resize Columns? dazman[_11_] Excel Programming 2 August 26th 05 08:27 AM
Dynamically add Checkboxes to worksheet columns Mark D'Agosta Excel Programming 1 September 29th 03 11:30 PM


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