# Return Heading For Maximum Value Of Each Row & Color Max Row Value

Mar 8, 2008

I have inventory in 9 cities. Cities names are in B2-J2. Line items are rows 3-100
In column K, I have the max formula for that row. What I need is, in column L, the name of the location city from row 2 where the max qty is located also color the max qty in the row.

## Return Heading Of Column With Maximum Value

Sep 16, 2007

In attached example, I have 3 columns of fractions with a final row of sumtotals (taken from elsewhere). I test to see which column has the maximum value in each row and allocate the result with the column's heading. Sometimes, two or more columns have the same max value. In this scenario, I wish to select the column heading that has the largest sumtotal.

## Return Row Heading With Max Value In Table

Mar 23, 2014

I uploaded a simplified version of the workbook I'm manipulating for reference. I'm looking for a formula where I can get the ROW heading of a table to be returned based on the max value of a certain column. My column headings in the table are months. I have separate place in the workbook where I have the Months listed in a Column (A9:A......) and in Cells (B9:B....) I want to return the row heading name from the table. The tricky part is that the column headings don't always stay in same place, so Jan isn't always in A1, sometimes it is in B1 or C1 of the table.

Essentially from my months listed is separate part of the workbook. In the cell next to each month I want to match that month with column in the table. In that column find the max value and return the row heading.

## Find Value In Row, Then Return Heading Above It

Jan 12, 2010

I have a 10x10 table. First row contains column titles (plain text, hardcoded). Each line below them has a 1 in *just one* cell. So, each line contains 9 zeros and one 1.

In the 11th column I want to check which column has the 1 in it and return the column's title. So, if the 5th row has a 1 in cell E5 I should get, in K5, the value of E1 (the title of the E column that is).

## Lookup Value - Return Column Heading

Apr 14, 2010

I want to lookup the max value within a group of columns and return the column heading (specified a cell) that corresponds to the max value.

## Return Heading At Point Total Is Met

Sep 2, 2007

I have a spreasheet with partnumbers listed in column A, a safety stock value in colum B, a restock date in column c, and quantities listed by month needed in the following columns, i.e.:

A B C D E F G
Part # Safety Stock Restock Jan Feb Mar Apr
123abc 50 Feb 20 35 20 10

In the example above, it is apparent that the safety stock will be delpeted in Feb.

I am trying figure out how to calculate the month that the safety stock will be depleted
and show this in another cell.

## Lookup Heading & Return Value X Rows Down

Oct 11, 2007

How do you count the number of columns in a range in order to reach ( find) a specific value in that row ?

## Return Column Number Of Heading

Jun 9, 2008

I have range like (3E:3K) in this range are only 2 different expressions. "Result and " forecast". I wanna look from left to right for the first cell with the string "forecast".
And than I want to work with the column of this cell, only this column.

How do i do that?

Edited
I corrected the coordinates. I want to look in a specific column line (Nr.3) from there the first Cell with "Forecast" and from that String the row number.

They following 4 posts were based on wrong informations by me.

## Lookup Of Row (return Data From Specified Row) With Column Heading And Value

Feb 21, 2014

Encryption algorythim.xlsx

Here is my scenario I have all this data i want to search in. In the rows there are repeating values and in the columns they do not repeat.

As seen in the attached i am able to give a column and row by title and then get the intersecting cell data from that. (Encryption lookup)

What i want to do is give the column tittle and row value and get back the row title. (Decryption Lookup)

This shouldn't be too hard seeing that the data in the columns has no repeats.

## SUM Until Specific Cell Is Reached And Heading Return?

Nov 18, 2013

I have a number of dates (columns) and under each date there is the demand value (Rows). Also, i have a column that has the current inventory. what im trying to do is to keep on adding the demand in one row (i.e multiple dates) until the sum just exceeds the inventory. After that, i would like to return sum the date at which we stopped adding. the point of this excercise is to see at which month will our inventory deplete according to the demand. Below is an example solved by hand.

Demand
Part #
month 1
month 2

[Code].....

Nov 18, 2008

I have a list of names and the chores they need to do on a certain day. I need a formula that returns the chore the person needs to do when the date is filled in.

Ex: Sheet2 Col:A has names filled in A2:11 , row B1:J1 has dates that you would input.
formula goes in B2:J11
Sheet1 is the master with all the data the formula would be pulling from.
column A2:A11 has the names , row B1:S1 has the chore that needs to be done.
B2:S11 has the dates already filled in.

## Search Table & Return Heading Of Found Value

Sep 8, 2007

In a large spreadsheet that receives external data, I have codes (U, N or V) allocated at various times to different rows as shown in sample worksheet attached. Elsewhere in the spreadsheet, I need to display (for later export) these codes along with their respective number in a sorted list. Please review the attached:

In the spreadsheet you'll see a column of codes, the next column is the data reference number, then to the right is three columns, one for each code. As displayed in the sample book attached, each Code column is to display the data reference number (from column 2)that matches that column's code.

What formula can I use to list these numbers in the appropriate columns?

## Return Heading Ascociated With Date Found In Table

Mar 1, 2008

Attached is a very small sample of a workbook that looks at community impact; before, during and after a project.

The source data (not shown) is down loaded from a system that can only supply the date in reverse order (see column A).
i.e. 20080229 = 29-Feb-2008. I've applied a conversion in column "C"....

= DATE(LEFT(\$A2,4),MID(\$A2,5,2),RIGHT(\$A2,2))

The 'properly' formatted date is then used to determine when on the scale of observation that given date falls.
e.g. the number of weeks before, during and after the project.

This is determined by the 18 week date 'matrix/ array' in columns F to X the red box is used to input the project start date, (& assumes the project runs to its normal 6 week time scale, it get REALLY messy if the boss prolongs or cuts short the project!)

From the result various figures and a graph using the properly formatted date are calculated, produced and presented showing....

The scale of the problem {before}
The impact of the project {during}
The lasting efftectivness {after}

You can see that I've managed a 'workaround' for the limit on the number of IF statements allowed in one formula using a rolling formula in columns; B then Z - AQ. This works OK, but!! combine that with the other formulae doing the impact calculations and 20000+ rows of data (with the acssociated workings in B + Z-AQ) the effect is to make make the file over 15Mb for 1!! worksheet, (the limit for emailing on the jobs system is 3Mb!!) & just to really make it scary sometime there are 2 projects on the go at once.

Before I created the attached the user responsible for these graphs and calculations manually counted dates & typed/copied & pasted the week number/tile, initially several days work followed by half a day every weekly update!

## Return Row Heading By Column Header And Specific Texted Cell Row Position

Jul 11, 2014

I have a data set, in which Sheet 1 have a matrix of high level showing Engineer, Program and commodity relationship.

I have to create separate sheet for each program on sheet 1, each program sheet should have Engineer name and commodity name from sheet 1.

Multiple commodities and multiple engineers should be separated by definite structure.

find worksheet with input and output (manual) as expected.

## Color Maximum & Minimum Value In Range

Feb 16, 2008

I use code as below to find max or min data row, data is in not integer, but match doesn't work, I got error 1004, "Match function's properties can't be accessd".

Sub SelectMaxMin(ByVal vSheet As Worksheet)
Dim i As Integer, oRange As Range, iRowMax As Integer, iRowMin As Integer
For i = 4 To 23
Set oRange = vSheet.Range(Chr(64 + i) & 6 & ":" & Chr(64 + i) & 82)
iRowMax = WorksheetFunction.Match(WorksheetFunction.Max(oRange), oRange) + 5
iRowMin = WorksheetFunction.Match(WorksheetFunction.Min(oRange), oRange) + 5
vSheet.Cells(iRowMax, i).Interior.ColorIndex = 40
vSheet.Cells(iRowMin, i).Interior.ColorIndex = 35
Next
Set oRange = Nothing
End Sub

## Lookup Maximum Value & Return Corresponding Row

Nov 28, 2006

i have a matrix

index| a| b| c|
0001 |1| 2| 2.22| ( probably it will be much clear to see the attachment)

I need to lookup for the largest number in B2:D2 (in this case 2.22) and return the corresponding header ("C"). I though it would be simple with hlookup() and max() but i can't make it work.

## Return Text Associated With Maximum Value

Jan 8, 2008

If I have names in one column and amounts in the next column, how do I determine the maximum of the amounts and return the associated name from the other column?

## Formula To Return Maximum Of Certain Data

Jul 4, 2012

Formula to return the max of certain data.

This is data for an electric car. T= Trip and C=charge.

Column F is the parking time between Trips (T).

For each "T" event in column E, I would like to return the MAX parking time available before the last "T" event for that day (date). I've highlight the last "T" events in red.

I have attached an example : forum2.xlsx

Column G is an example of the output that I would like to achieve.

Note: For the last "T" event of the day it can just return the actual parking time (shown in green).

## MAXIMUM Function Limit: Return A Value?

May 8, 2009

What I'm trying to do is get the MAX function to return a value, but that value needs to come before the values reach zero. It's a cubic equation that basically starts, at the beginning of the data range, under 10 then hits zero and ends up near 30 at the end of the data range. The end data range max doesn't matter to me if the data range hits zero along the way. Is there any way to make the MAX function stop at a certain value, or is there another function that could accomplish what I'm trying to do?

## Return Maximum Date Or Blank

Dec 9, 2009

I am currently using an array to return the MAX date value. This formula will enter 1/0/00 if the referenced cells are blank. I'd like the furmula to LEAVE THE CELL BLANK if the referenced cells are blank. {=MAX(IF(Bid_Circuits=\$A45,Bid_Trim_Completed,""))}

## Return MAXIMUM Based On Criteria

Aug 13, 2008

i have a spreadsheet like the following

A B C
Country Revenue Month
1 UK 10 Jan
2 France 20 Jan
3 US 30 Jan
4 UK 25 Feb
5 US 35 Feb
6 France 5 Jan

and so on...

So where country = UK, France or US I want to retrieve the MAX revenue from all months and which month it was in. Eg UK max revenue was in Feb of 25. I am not sure how to apply the max formula with criteria. Is there any way to do this?

## Return Maximum Value Among Multiple Records With Same Key Using VBA

Mar 1, 2013

I am writing a VBA function that will search for a value in a column(say column B) in a table. This column can have duplicates. So my search needs to get all the records that match the value (including duplicates) and from these records i need to return only one value among records fetched that has maximum in another column in the same sheet(say column D).

Eg :

sno dept name marks r1 cs sush 55 r2 ece ram 68 r3 cs harish 77 r

So if i give "cs" value to search it must give me 77 as output. I tried to write my own Lookup function but isn't working and getting #value.

## Return Data Corresponding To Minimum & Maximum

Nov 26, 2008

Please see attached file which is data for horse races (this is a small example of the data i will be working with). I need to find the largest values from the MIN and MAX column (shaded Grey) range for each race. I want to be able to add a function that will allow me to quickly identify which horse has the largest number in both the MIN & MAX columns example on spreadsheet is highlighted RED. It would be handy if it would inform me if the criteria has been met by highlighting it or by placing some text value in an adjacent cell on my spreadsheet i have used the example "Y".

It would also be beneficial if that race be deleted in its entirity if there are no horses which meet the criteria above or similary if all other selections within that race be deleted if ther is a horse which meets the criteria. If there is a selection within that race i will need to keep the row that includes the heading which is coloured blue on the attachment.

I will be working with 20,000 or more selections at a time so it is important that they can be identified quickly for ease of use.

I have tried the functions i know such as MAX and LARGE but this requires me to do alot of work when you consider the ammount of data i'm required to work with.

## Lookup Maximum & Minimum. Return Corresponding Row

Nov 2, 2006

I have searched your forums and thought I had found a sufficient answer but could not get the vba to work. So any help is greatly appreciated. I am trying to determine a max value from a list then put that value in a cell. Next I want to determine how many times and on what day that max value occured. From there take the value and concatenate them adding a "," between them I have attached an example. I would like the values placed in cells F1 and H1 (the other is a min value and when it occurred)

## Return Corresponding Cell For Maximum In Another Column

Oct 22, 2007

* I hav two columns B and N having some data. From column N i need to find the Maximum valued cell.

* And now i need the content of a cell in column B in the same row , which matches with maximum value.

## Return Values Either Side Of Maximum Value

Jan 23, 2008

How can I select specific values either side of a peak value?

In the attached file I have a peak value of 10 and would like to select both values of 5 so that I can then identify the frequency they occur at.

## Return Cell Address With Maximum Value

Mar 13, 2008

I have two columns of numbers in column A & B. In column A I am trying to locate the maximum value and get the cell address of the number next to it in column B. I am currently using this formula to do this ..... =ADDRESS(MATCH(MAX(A1:A4),A1:A4),2,4)

It works ok, but if the maximum number is the first value in the column it is returning the last cell address in column B. I am not sure what I am doing wrong.

## Return Cell Address Of Maximum Number?

Jan 20, 2009

i'm looking to return the cell address of the max number in a given range?

## VBA Macro To Return Maximum Value In Text Form..

Jul 15, 2009

I am a novice to VBA in excel, i have a table of more then 5000 rows. I would like to find a maximum value from each row and return the column title as "GL_Weld" or "Bend" or "Header" into another worksheet cell. i.e First Row max value = 0.011510 should return "Bend" into another worksheet

0.0001700.0115100.000500
0.0000000.0007800.000000
0.0002400.0110700.000480
0.0000000.0006600.000000
0.0000000.0037700.000000
0.0000000.0000100.000000
0.0002800.0108700.000480
0.0000000.0007100.000000
0.0002000.0112900.000490
0.0000000.0008400.000000
000.00002
00.000310.00001
000.00004
00.00030.00002
000.00001
00.000270.00003
000.00002
00.000260.00004

## How To Return The Maximum Value In A Multiple Results LOOKUP

Dec 11, 2008

What I am try to do is look up the highest (maximum) date in a lookup up that has multiple results.