# Return Highest Value Of Column Headings With Matching Text In Array?

Mar 7, 2013

I have an array of data with multiple codes stored in text...

I want to set a formula in a cell to look for all instances of specific text in an array. Then compare the value of all of the column headings, which are numbered across the top of the array, which contain a match in that column and return the highest value.

Example: 10x10 array, columns 1,3, and 5 contain "text" somewhere in those columns. Formula would return 5.

## Nested Index / Match Array - Return Value In Column C When Matching Column A And B But With Few More Criteria

Jun 7, 2014

I am trying to use a nested INDEX and MATCH array formula to return the value in column C when matching column A and column B, but with a few more criteria.

The range containing all the data

A
B
C

1
Cat 1
January 1, 2014
John

[Code] ..........

I am looking for the array formula to return the name of the person in column C who is in Cat 1 after the date in column B.

For example;
C7 should return "John" because B7 requests "January 15, 2014", which is after the value in B1
C8 should return "John" because B8 requests "February 15, 2014", which is after the value in B1
C9 should return "Andrew" because B9 requests "August 15, 2014", which is after the value in B4

The best try I had for the formula in C7 was

{(INDEX(\$A\$1:\$C\$4,MATCH(1,(\$B\$1:\$B\$4>=B7)*(A\$1:\$A\$4=A7),0),3))}

This brings back "John" as desired in C7, but when copying down the table into C8 and C9 both C8 and C9 return Andrew.

I guess this is due to my ">=" condition in the Match formula and it is returning "Andrew" because "Andrew" is also after the date requested, but I cannot for the life of me work out how to get it to work.

## Combine Matching Column Headings From 2 Worksheets To 1

Sep 15, 2006

1) I have 2 worksheets that contain 2 matching name columns; " Date" and the primary column A "Symbol". The rest of the column headings in each of the worksheets are different. Data (from internet sources) is inserted into the worksheets in table format on daily basis

Sheet 1 name = Data 1
Sheet 2 name = Data 2
Master worksheet name = MERGED DATA

2) I use the Match and Index formula for both sheets

the following formula is inserted in row 2 of Data 1 and Data 2 sheets (other than Col A "Symbol")

for column B in sheet 1

=If(Or(ISERROR(MATCH(sheet1_DataLookup,\$A5:\$A65536,0)),sheet1_DataLookup=""),"",INDEX(B5:B65536,MATCH(sheet1_DataLookup,\$A5:\$A65536,0),1))................

## Transfer Data From One Worksheet To The Next By Matching Column Headings

Feb 25, 2012

I have a few row headings on a fresh worksheet (called "New" like so for A1, B1 and C1 for example):

Date Amount Title

I then have raw data on another worksheet. This data has many column headings (more than on the "New" sheet) and the data for that heading in the column underneath heading. So the Date column will have say 50 rows of dates in the column. What I want to do in VBA is match the headings from the "New" worksheet to the raw data worksheet ("Data") and then copy and paste the data into the column under the row heading in "New" from "Data".

with the code for this? I have tried using MATCH and I can't get it to work. I'm also looking for an efficient way to do this I'm sure I am doing it a very inefficient way.

## Transfer A Matching Column Headings' Data In 2 Worksheets To 1

Sep 18, 2006

1) I have a Master worksheet that combines/appends data from 5 worksheets. The data in the 5 worksheets is cleared on a daily basis once data has been transferred (using a macro) to the Maser sheet.

2) I use the Match and Index formula for the 5 sheets. Column A "Symbol" being the primary value

Problem:

I have Matching column headings " Date" in 2 worksheets, I can only use date data from one of the sheets that contain the date column data. Here is the formula I use in the master to accept data from the worksheet

=If(Sheet1!C2=0,"",Sheet1!C2)

Sheet1 has the column heading "Date" that is linked to Master Worksheet column Heading "Date". Is there a possible way to re-write the formula where It can accept data from either sheets instead of only 1 sheet?

Going back to the fact that I have 2 date columns in 2 worksheets
Lets say for example;

I have Symbol AAA in Sheet1
I have Symbol ZZZ in Sheet2
I have Symbol GGG in both sheets......................

## Count If And Return Of Column Headings

Nov 3, 2008

I have a sheet where a name could appear multiple times in a 22 column data range. I would like to list all the names on a second sheet in Column A and in column B (and further columns as necessary) return the heading name of column where the name is found in cells next to the name.

I think Count If will work for giving me the number of times the name appears in sheet one but is there a way to return the column headings along the same row as the name?

## Return Column Headings Where Data Is Present In Row

May 28, 2008

Is there a way I can return a column heading(s) if text is present in a row?

Refer the attachment... ozgrid.xls

Names are listed down the left, headings along the top, with data in the corresponding cells. For each unique name i.e 'Steven' is there a way to list each heading data is found i.e 'Shop2, Shop4'???

## Return Column Headings Where Data Is Present In Row

May 28, 2008

is there a way I can return a column heading(s) if text is present in a row?

refer the attachment...

names are listed down the left, headings along the top, with data in the corresponding cells. For each unique name i.e 'Steven' is there a way to list each heading data is found i.e 'Shop2, Shop4'?

## Using COUNTIF To Return Matching Array Values With A CONDITION

May 9, 2014

I'm having a difficult time returning COUNTIF values for a positive match between 2 columns THAT meet a certain condition. Basically I want to iterate through column A sheet 1 (ONLY for values where column B is paid) and return a count for every instance there is a match of value A sheet 1 in column A sheet 2. In other words, I'm looking to find the number of ids marked as paid from Column A sheet 1 that exist in Column A sheet 2. I don't wish to return the actual ids, just the total count.

I've tried the following but I know there's an error in iterating through Column A the way I have it:

=COUNTIFS(Sheet1!\$ColA:\$ColA,Sheet2!\$ColA:\$ColA,Sheet1!\$ColB:\$ColB,"paid")

Sheet1:
ColA
ColB

123
paid

[Code] .....

Sheet2:
ColA
ColB

23
NY

[Code] .....

## Show The Headings Of The Four Highest Marks In Each Row

Nov 7, 2009

I have tried to construct a formula for columns M N O and P to extract the names of the four best marks for each student. I have used the 'Large' formula but it does work when there are equal marks in the list.

Has anyone used a formula to order the first four highest marks and show the headings?

Here is a sample of the Spreadsheet I am using.
(Using Excel 2003)

(ignore the commas - they are just spacers for the data when posting)

,B,,,,,,C,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,M,,,,,N,,,,,,O,,,,,P

Foot, Athl, Base, R.Cl., Rug, Crick, Tram, Bad, TT, Gym, Golf,,,,, 1st,,,2nd,,,3rd,,,4th

,20,,,,,25,,,,21,,,,,19,,,,22,,,,,20,,,,,24 ,,,25,,,,21,,,24,,,,19,,,,,, Athl Bad Tram Gym

,25,,,,,21,,,,19,,,,,22,,,,20,,,,,24,,,,,25,,,,21,,,,24,,,19,,,,25,,,,,, Foot Tram Golf Crick

## Multiple A Logical Result Array With A Text Array And Return Text

Aug 6, 2009

I need to multiply an array of logical results ( returned as {1,0,0,0,1,0 et.}) with a text array (a reference column) and return the text in the reference column in case the value in the logical array is 1.

## Return Column Of Second Highest Value In Row Where It Is Same As Max Value

Jun 13, 2014

I have a row of numbers (per example below) and I would like to return the column header for the max value and the second highest value, even when the second highest value is the same as the max value.

For example

A B C D E Highest Second Highest
1 2 3 2 3 C E
3 1 3 2 2 A C

The return values are under the highest and second highest column headers?

## Copy Worksheet Data For Matching Headings On Another Sheet

May 21, 2008

I have some specific requirement and it would be great if I could do it through macro. Also attached a sample excel file for the requirement. I have raw data in a worksheet (WS1) that I receive daily from factory. There is another sheet in a different workbook (WS2) that has format specified on how to display this raw data. The order of raw data on WS1 remains same. The question is that how do I replace the format titles with raw data?

For example, in the attached excel sheet, sheet "data" has list of values. Sheet "format" says how to display data. Sheet "output" is output that I finally want to generate. The sheet "data" will always have data in the same order. I need to read values and replace the format title ( name, age etc) with corresponding values on "data" sheet.

## Return Value In Third Column If Values In First Two Columns Matching?

Mar 20, 2014

I have a two different workbooks book 1 and book 2 with some data.

If values of first two columns ( Column A and B) of both workbooks are matching then I want a formula that can return the value of third column (column c) of book 2 in book 1 column c.

example:

Book 1

column A / Column B / Column C

100 / 200 /

Book 2

Column A / Column B / Column C

100 / 200 / 300

now I want a formula that can return in column C of book 1 to display 300.

And the data runs across some 100 rows in both workbooks.

## Return Text From A Mixed Text/value 3d Array Result

Dec 2, 2009

I've been searching the forums and web trying to figure out how to extract a text value from a 3D array result, to no avail or well beyond my understanding.

I've attached a file which shows an abbreviated version of the search (from the original 49 col x 400 row, which shows the name to date array which can return a sum.

What I'm looking to do is identify within this array result if there has been a text entry, and return the text as opposed to a sum of the remaining values. This is essentially a double check to make certain that there aren't hours scheduled when other events such as vac/loa/etc are also booked.

## From Matching Numbers In One Column Return Value Of Second Cells In Another Cell?

May 19, 2014

I have a table with 4 columns where in column 3 I have part numbers and in column 4 I have the number sold. In column 3, the part sold can be listed several times with a different number sold in the column 3. What I need is code to go through the part numbers and return a total number sold for that part in a new column. I have sorted the table by part number, then by Column 1 which is for the date. The new total should go in the last column with the oldest date for that part.

## Match Function To Return Column Number For Matching Date Errors?

Aug 5, 2014

I am trying to use some vba match function code to return the column number of the matching date. The date will be stored in a date variable.

Every time I run this code I normally get a match error even though the date is in the worksheet and the variable matches that date.

See below:

[Code] .....

## Array Formula To Return Text

Mar 18, 2009

I have an Array formula that returns a value from several rows below:
=MAX(IF(\$P\$8:\$AQ\$8="Today",\$P13:\$AQ13))

Row 8 contains only text and only one occurrence of the word "Today".
Row 13 has only numbers. The corresponding value directly below the column containing the word "Today" is returned successfully.

I now need a similar formula to return a text entry located in the same column but on the previous row (row 12) directly above the value just returned and this row contains only text entries.

Using the above formula and referencing \$P12:\$AQ12 returns 0 as expected.

## Search For Value In Multiple Column And Row Array And Return Value In First Column?

Dec 16, 2013

I have an array 20 Rows x 42 Columns, which contains a competition draw.

I need to search this array for a unique value and return whatever the time is in the first column on the same row as the value appears, and enter it into column C in the Womens Times sheet.

I also want to return into column D the court number from row 3.

The reason i want this automated is as teams enter / withdraw we may need to drag the games from court to court to fill gaps, so i want the Womens Times sheet to update accordingly.

I have been messing around with index and match, but cannot quite get it to return what i need.

I have attached an example ... on the sheet "Womens Times" in column A there is a list of game numbers ( #1W etc etc) indicating womens game #1 and so on. The main sheet i am using also has a seperate tab for the mens games, hence the designator of W or M on the end of the game number.

## Formula To Total Values In Column Matching Text In Adjacent Column

Dec 20, 2013

Formula(s) to do as explained in the attached example.

Example_formula.xlsx

## Formula To Find Matching Values In One Column And Return Totals For All Rows That Match

Dec 26, 2013

table1.jpg

I am looking for a formula that will satisfy the following:

1) find all the values in column "A" that match
2) In column "G", sum up all the values in "F" that go with the matching values in column "A"
3) For example, in rows 14-16, the values in column "A" match. Cell G16 sums up F14:F16

## An Array And Return The Same Row In Another Column

Nov 9, 2007

I have an array with a lot of rows and columns filled with different codes.

I need to look into this array for one specific number and return the value in the same row in an specific column.

I can't use Vlookup in this case because it needs to have the values you are looking for in the first column and my values are spread in different columns.

## Finding Value In Array - Return Value On Same Row But Different Column

Feb 7, 2012

I have an array that is 60x100 (column x row).

I'm trying to search for a value in that array and return the value on the same row, but shifted to the right one column.

Example: If my value is found in D63, I want to return the value in E63.

I've been messing with Index, Match, and Offset, but I can't get anything working.

## Index / Array Return A Value From Same Column In Another Sheet

Jun 2, 2009

I am currently looking at a simple data set spanning a few years of annual average data. I want to create a front sheet to show people in what year the maximum value was reached for each site but am having trouble returning the values......

I want the formula to say - find the summary sheet max value cell in the main data sheet row 2 (for XYZ) and return the corresponding column from row 1 (year). I've got myself in a muddle trying to create array data from the index function and want something simple. There are only about 30 rows so am happy to manually select the rows in question and repeat the formula entry so it doesn't need to be fancy.

## Search Substring Of Array Matching List Of String From Another Array?

Dec 20, 2013

I need to export this to Xcelsius which doesn't support any macros/vba. Btw I can;'t use Row() in xcelsius too.

[Code].....

## Vlookup: Search For Value In SECOND Column Of Table Array And Return Value From FIRST

Oct 7, 2008

I'm looking for a formula to search for a value in the SECOND (instead of first) column of a table array and return a value in the same row from FIRST (instead of the same or another) column in the table array. Formula would be searching for the unique production order number in the column B and return production line id from the column A.

A1 production line_id
B1 poduction_order_number

A2 L1
A3 L2
A4 L1

B2 505212
B3 504234
B4 505663

I was trying vlookup(504234;B2:A4;2;0) to make formula go search from right columns to the left but then excel is switching the search table to A2:B4 and gives #N/D!
One remark-there is no possibility to switch these 2 columns to simplify. I have to leave them as they are.

## Lookup Function - Return Value From Column That Relates To Array

Apr 12, 2013

I would like to write a formula to return a value from a column that relates to an array within which my lookup value exists. See the tables below:

ID
V1
V2
V3

105
27
3
149

[Code] .......

The tables above are on different sheets within a workbook. I would like to write a formula that returns the "ID" numbers from column "A" in the first table, based on values in columns B-D in that first table, into column "C" in the second table. For example, in this case, the ID number that corresponds with the value "12491" would be "109", since 12491 corresponds with 109 in the first table.

FYI, the "Value" numbers in the second table are calculated based on their rank (high-low) within the matrix in the first table.

I tried the INDEX-MATCH function, but it doesn't seem to work if I'm trying to find a value within a 2-D array- it only works if I'm looking in a single column.

## Getting The Second Highest Value From An Array

May 23, 2007

Is there a way to get the second highest value from an array in vba?

## Return Text From Left-hand Side Of Ragged Array Where Entry Found

Apr 11, 2012

I've been given a spreadsheet that is poorly constructed but I'm not allowed to alter.

The layout is:
Box Name Box Date ID1 ID2 ID3 ....
Where there is not a fixed number of IDs in each box
(There are five different sheets so I'll have some fun concatenating results)

Given a list of IDs I need to return the box name and box date that the ID's file sits in. The spreadsheet has blanks everywhere and the numbers contained in rows are non-consecutive and smaller values can appear later in a column than larger ones.

I think I need some combination of index, offset and maybe sumproduct? TBH, I avoid sumproducts like the plague, preferring to utilise sumifs and dynamic named ranges since this improves clarity so I'm basically a newb at them.

Any skeleton framework that you think would work to return the text values for the LHS where the number could be anywhere? Once I can see a rough example I should be able to get to grips with the logic and wrangle it into the necessary solution.

## Copy All Rows On Text In Column A Matching Those In Another List

May 21, 2013

Basically I would like to copy rows where the name of the person (in Column A) matches a separate this.

E.g.

Name
DOB
Peter
30/9/1956
Jim
09/1/1923
Paul
01/2/1966

Lookup list:

Peter
Jim
In Sheet2:
Name
DOB
Peter
30/9/1956
Jim
09/1/1923

Note that there are many names (this is just an abstract) so I think it requires a macro.