Programming question

H

Howard Brazee

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
 
R

Roger Govier

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.
 
H

Howard Brazee

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
 
R

Roger Govier

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.
 
H

Howard Brazee

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
 
H

Howard Brazee

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sending a macro-enabled spreadsheet 2
Help in determining age 9
Names 5
Copying a row to another spreadsheet 1
Months between two dates 5
VB macros in new Excel 24
Ignore error 2
Different kind of cell reference. 8

Top