Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Programming question

I have a VB enabled Excel document.

One tab has a value in Column B. If that value is "A" or "B", I want
to create a row somewhere that contains the lowest value of the
corresponding columns C, D, E, F, G, H, I, J, K, M, N, O, P, Q, R,
S, T, U

This tab is growing. Could someone assist me in creating this row?

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 376
Default Programming question

Hi Howard

No need for a macro.
In Z2 enter
=IF(OR(B2="A",B2="B"),MIN(MIN(C2:K2),MIN(M2:U2))," ")

Copy down the sheet, as far as you wish.
As rows become populated, then the formula will produce the result.

--
Regards
Roger Govier

Howard Brazee wrote:
I have a VB enabled Excel document.

One tab has a value in Column B. If that value is "A" or "B", I want
to create a row somewhere that contains the lowest value of the
corresponding columns C, D, E, F, G, H, I, J, K, M, N, O, P, Q, R,
S, T, U

This tab is growing. Could someone assist me in creating this row?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Programming question

On Tue, 23 Mar 2010 18:00:18 +0000, Roger Govier
wrote:

No need for a macro.
In Z2 enter
=IF(OR(B2="A",B2="B"),MIN(MIN(C2:K2),MIN(M2:U2)), "")

Copy down the sheet, as far as you wish.
As rows become populated, then the formula will produce the result.


I'm trying to produce a new row, not a new column.

For instance:

New Row name 12 12 13 5 8 ...
A 12 55 33 18 9 ...
B 33 12 88 5 22 ...
C 3 8 12 55 0 ...
B 33 88 13 5 8 ...
....




--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 376
Default Programming question

Hi Howard

Then, place the "new row" as a fixed row ABOVE your existing Data, with
a further new row inserted above that.
So now your data would start in row 3
In C1 enter 3, in D1 enter 4, highlight both cells and drag across with
the fill handle to step up the number.
In c2 enter
=INDEX($Z:$Z,C$1)
and copy across as far as required.

You will now have a row of Minimum values in row 2, with the
corresponding row number from where this data was extracted in the cell
above.

--
Regards
Roger Govier

Howard Brazee wrote:
On Tue, 23 Mar 2010 18:00:18 +0000, Roger Govier
wrote:

No need for a macro.
In Z2 enter
=IF(OR(B2="A",B2="B"),MIN(MIN(C2:K2),MIN(M2:U2))," ")

Copy down the sheet, as far as you wish.
As rows become populated, then the formula will produce the result.


I'm trying to produce a new row, not a new column.

For instance:

New Row name 12 12 13 5 8 ...
A 12 55 33 18 9 ...
B 33 12 88 5 22 ...
C 3 8 12 55 0 ...
B 33 88 13 5 8 ...
...




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Programming question

On Wed, 24 Mar 2010 10:21:03 +0000, Roger Govier
wrote:

Hi Howard

Then, place the "new row" as a fixed row ABOVE your existing Data, with
a further new row inserted above that.
So now your data would start in row 3


My summary row is row 2, I get. Column A currently has a date,
column B currently has a type (assume it has values "A", "B", "C",
"D", or "E"). I am only interested in summarizing data for rows
containing "A" or "B" in column B.

In C1 enter 3, in D1 enter 4, highlight both cells and drag across with
the fill handle to step up the number.


I don't understand this. What are the numbers 3 & 4? What's a fill
handle? Where do I drag these to? Why?

Currently I already have data in C1 and D1 (headings)

In c2 enter
=INDEX($Z:$Z,C$1)
and copy across as far as required.


What is "Z"?

You will now have a row of Minimum values in row 2, with the
corresponding row number from where this data was extracted in the cell
above.


I'm showing my ignorance here.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Programming question

On Wed, 24 Mar 2010 08:10:57 -0600, Howard Brazee
wrote:

Then, place the "new row" as a fixed row ABOVE your existing Data, with
a further new row inserted above that.
So now your data would start in row 3


My summary row is row 2, I get.


(Actually row 2 is already a summary in other worksheets in this
spreadsheet that use this pages data, so that works out great).


--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
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
Programming question Kelly Excel Programming 1 March 13th 06 07:03 PM
VBA and F2 programming question nl_fan[_3_] Excel Programming 0 October 1st 04 05:00 PM
VBA and F2 programming question nl_fan[_2_] Excel Programming 0 September 29th 04 04:53 PM
VBA and F2 programming question nl_fan Excel Programming 2 September 29th 04 04:41 PM
Programming Question Jon Turner Excel Programming 10 June 28th 04 04:03 AM


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