# Single Formula/Function Return Results To Multiple Cells

Aug 26, 2006

I've got an If statement in Excel which features several VLookups - I need the IF statement to return differing results to 2 different cells, is this possible?

In plain English, I'm looking for something like

If(Vlookup(A2, B2:D5, 4, False), C6="y" And D7="ok", "False")

Obviously this is a very crude example

## Lookup Single Value In One Sheet, Return Multiple Results From The Other Sheet

Apr 6, 2008

i have two sheets, one to display results (Reults tab) & the other tab containing the data (Data tab)

what i am trying to do is some how create a search function and have a forumula which contains a LIKE function that looks up the data table
RANGE = Data!A2:K255

the search needs to lookup the primary column Data!B2:B255 ... if any results are found .. show them on the results tab.. and if multiple results are found, display those as well.. (in either instance, the whole row of information in respect to the results need to be dislayed and hopefully no duplicates are found .. eg, Data!A:K of a hit)

is there a formula that can achieve this? oh, the search is TEXT based and there should be no empty cells within the dataset

after some MASSIVE googling, i have stumbled accross this

B1 = Search box (txt field)

A6 (which will be a hidden column) contains =MATCH(\$B\$1,Data!A2:A255,0). this formula provides the first instance of the result and provides the row number

A7 contains =MATCH(\$B\$1,OFFSET(Data!\$A\$1,A6+1,0,8-(A6+1),1),0)+A6.
this is supposed to look for the next row number which contains a match and provide that row number

and througout my other columns, i have
B6=OFFSET(Data!\$A\$1,A6,1)
B7=OFFSET(Data!\$A\$1,A6,2)
B8=OFFSET(Data!\$A\$1,A6,3)
and so on

2 things i cannot recitify..

1, the match has to be EXACT ... unfortunately i cannot use exact .. needs to be LIKE .. eg, i cant use the search word "boat" as the range of data has "boats"
2, it comes up with multile .. irrelevent results.

## Return Multiple Results In Multiple Cells Based On Criteria In Yet Another Cell?

Feb 1, 2012

Worksheet 1: In column A I have a people's initials. In coumn B I have text boxes with miscellaneous text. (The same person could have multiple rows within this sheet.)

e.g.
AAA blue
BBB orange
AAA round
CCC smelly
AAA elongated

Worksheet 2 I want to show:
A2 = initials, B2 = first text box associated with that person, C2 = second text box (different row) associated with that person (if applicable), D2 = third text box (different row) associated with that person (if applicable), etc.

e.g.
AAA blue round elongated
BBB orange
CCC smelly

## Lookup Formula To Return Multiple Results?

Dec 8, 2013

I am trying to create a workbook where I can log what work I have done in one spreadsheet and allocate an invoice number to it. In a separate spreadsheet within the same workbook I have created an invoice template. When I enter in the invoice number into the invoice template it's not collecting the correct information.

For example, if I want the details for invoice 10 to show in the invoice template, details for invoice 19 appear.

I have used this formula:
=IFERROR(INDEX(ServiceRecord[[Invoice number]:[Date invoice issued]],
SMALL(IF(ServiceRecord[[Invoice number]:[Date invoice issued]]
='Invoice TEMPLATE'!\$F\$8,ROW(ServiceRecord[Invoice number])),ROW(1:1)),2),"")

I am wanting to add new information as time goes on and also to be able to put in any invoice number into the invoice template to recall information as needed.

## Sum Of Multiple Cells And Return It To One Single Cell

Nov 4, 2009

I'm trying to take the sum of multiple cells and return it to one single cell using the Vlookup

For Example I want to match the ID numbers from one spreadsheet and use the list of codes to return the value of the sum of all matched numbers. So in this example I would want the number 65 in one cell...

## Search Workbook For Cells That Meet Multiple Criteria And Return Results From Rows

Jun 28, 2013

I would like to perform a search on only the worksheets listed in a worksheet titled table of contents. I would like to use multiple criteria for this search and send only the unique results to a worksheet titled results. Each worksheet listed in the table of contents has a cell address for each heading that I would like to extract data from the same column. The attached workbook example shows the data that I would like to collect when I search for cells that begin with "AB" and cells that begin with "CD". I collected this data by copy and pasting all the data from each worksheet into the results page and then applying filters and advanced filter to remove duplicates. This method does not work well for the original workbook as the data is quite extensive.

Create_List.xlsx

## Find Multiple Instances Of Single Criterion In Row & Return To A Single Col

May 8, 2006

Find Multiple instances of Numeric Criterion in Row & Return To a Single
Column.

I have a Dynamic Named Range "Data" spanning 10 Columns and many Rows.
Each Row may contain duplicates of the Numeric Criterion.

I would like to find ALL instances of a specific Numeric Criterion across
each single Row in the Dynamic Range "Data" and have the Results returned to
a New Sheet in a single column.

NEW Sheet:
The Numeric Criterion is housed in G5.
The matched criterion should be returned to the New Sheet starting at G7.
Duplicate instances in the same Row should ALL be returned to the same cell
in Column G on the New Sheet.

Sample Data Layout:
Columns I J K L M N O P Q R
Row No.76 1 0 1 1 0 1 1 1 0 1
Row No.77 2 2 3 2 1 2 2 0 0 0
Row No.78 3 3 3 3 3 0 3 0 3 0

Scenario:
Looking for Numeric Criterion 1 (one).

Expected Results - New Sheet:
Row No.7 Column G (Cell G7) 1111111
Row No.8 Column G (Cell G8) 1

In Row 76 of the Sample Data ALL seven Numeric Criterion of 1 (one) should be
returned to the same cell G7.
In Row 77 of the Sample Data there is only one Numeric Criterion of 1 and it
should be returned to cell G8.

## Function Returns Value To Cell As Single - Function Is Defined To Return Double

May 14, 2013

Function Haversine has correct value in debugger but in cell it has the same value as Haversine2. Is this a known bug?

Public Function Haversine(lat1 As Double, long1 As Double, lat2 As Double, long2 As Double) As Double
Dim temp As Double

[Code]....

## If Function To Return One Of 3 Results

Nov 22, 2007

I am looking for a formula that will yield the following: IFAH9>AI9 return the word Green, IFAH9=AI9 return the word Blue, IFAH9<AI9 return the word Yellow. If AI9 is blank stay blank.

## Formula/Function To Return Multiple Values Based On Criteria

Aug 25, 2006

I would like to be able to use the Vlookup function to return more then one value as a result of the criteria. I have a cloumn of dates that populates the X axis of a gantt chart with data whilst the Y axis will be populated by a site reference resulting in a program of work, the Y axis data is the result of a vlookup function. My difficulty arises however with multiple sites, for instance where two or three sites will be visited on the same day. The vlookup function will only return the first value it finds in a range to the formulated cell. The result being a missing site(s) from the gantt chart / work program. is it possible to return all values to a cell i.e. site1, site2, site3. using a vlookup or do i need to use another method of doing this?

## Excel 2010 :: Multiple Formula For Single Cells?

Feb 18, 2014

I'd like to apply multiple formula to a set of cells on a summary page. My summary page also contains 3 variable dropdowns, and I'd like to display data based on the text selected in those dropdowns (pulling data from 2nd tab "Variables")

The following formula works in the first instance:

=IF(AND(H4="Product Type A1", H6="External", H8="Existing"), Variables!C4, 0)

What I'm struggling to do is add additional formula to the same cell in order to deal with the remaining eventualities of the drop down variables:

Variable 1:
Product Type A1
Product Type A2
Product Type B1
Product Type B2

Variable 2:
Internal
External

Variable 3:
Existing
New

Or am I better using a VLOOKUP or something?

## Multiple Cells Pointing To A Single Reusable Formula

Mar 30, 2007

I would like to know if you can point (lots of ) cells to use a formula specified once somewhere else. The problem I have is 6 large formulas duplicated down 6 columns for 7000 rows. This, it turns out has made my file size huge ! Instead of duplicated the formula, can I tell all the cells to use *this* formula, but remembering to increment the references within...

## Display Multiple Results In Single Cell?

Feb 25, 2012

I am using excel as a scheduling program. The sheet has days of the month across the top, and staff names down the column. We have 5 shifts D,A,B,C,N. I am using the following formula to display if shifts have been scheduled for the column

if(countifB10:N23,"N")=1,"X","N") i.e for the night shift. I then use conditional formatting to change the cell to green if the night shift has been scheduled, or red if it has not.

I would like to have the results of all 5 formulas display in a single cell, to save Real Estate, then have the cell go green when all shifts have been scheduled for the day (column).

Is this even possible?

## VBA - Searching Multiple Worksheets And Pasting Results In Single?

Jan 17, 2014

I have multiple worksheets with part numbers and prices for different computer parts. On each worksheet I have multiple sets of part numbers and prices but I only need one the information from specific part from each worksheet. Luckily, the part number I need is also the name of whatever worksheet contains it. I want to take the part numbers and prices from the parts I need and put them in one master sheet called "PartsNumbersCombined". Currently I haven't even attempted to format the data in PartsNumbersCombined, I am just trying to actually pick up and move the correct data. Here is my code:

Sub harvest()
ShtCount = ActiveWorkbook.Sheets.Count
For i = 2 To ShtCount

[Code].....

The part numbers are in column A and the prices are one row down in column C. I feel like I am close but I can not get anything pasted on my master sheet.

## Multiple Duplicate Lookup Results In Single Cell

Aug 15, 2007

I have attached a copy of what I am trying to do. I've been researching vlookup for a while and everything I try doesn't seem to work. I'm also fairly new to Excel, so most of this is my first time trying these formulas.

In the attached test.xls file, I have two sheets created. The first is "Responsibility," and the second is "List." The data in "List" is what I am trying to pull from. As you can see, the people's names are listed more than once as the list goes down. On the "Responsibility" page I have each person's name one time. In the "Extinguisher" column, I'm wanting it to list every number that is found next to the person's name on the "List" sheet. For example:

Column B2 on the "Responsibility" sheet should read as follows:

1,2,3,17,24

Here is the formula I have in these cells:

=VLOOKUP(\$A2,List!\$A\$3:\$C\$38,3,TRUE)

## Find & Copy Multiple Results Into Single Cell

Sep 29, 2007

I have a macro which scans column "AV" in Sheet1 and if a particular value is found it will copy certain cells from that row and paste them into Sheet2 on Row 10 starting with column "E".

With the current code I only paste a single instance, if the value is found more than once I only have the last one pasted. How can I best set this up so it will paste ALL found value results within Row 10?

The four copied results do not have to be in separate cells, it is actually best if the cells are combined. On Sheet2, cells E10-H10 can also be setup to have the data pasted across all four cells and that way Row Height AutoFit would take care of expanding the row's height to accommodate the possibly of having four or five sets of results being combined together and pasted into E10.

Rather than the typical result appearing as:

[TABLE]______E___F___G___H
10__1223 122 2222 2222
11__343 565 4554 5990
12__9755 334 6787 6788[/TABLE]

It is better for me if the data appears like this:

[TABLE]_____E____F____G____H
____1223 122 2222 2222, 343
10__565 4554 5990, 9755 334
____6787 6788
[/TABLE]

Is this even possible using a macro? It is currently being done using a Word document but I am wanting to automate the process and try to handle all the data sorting within Excel, if possible.

Sub Number()
Dim colSearch As Range
Dim celVal As Range
Dim celRow As Range
With Sheets("Sheet1")

## Multiple Comma Separated Lookup Results In Single Cell

Mar 13, 2008

I have a cell witch contains CSV I need too look up all the values off a master list an out put the vlookup results in 1 cell

Example:

( SHEET 1/Cell A1)

10,11,12

(SHEET 2/ look up list)
.A .B
110101
211102
312103
413104
514105

(SHEET 1)
I need the output to show the following in Cell B1

101,102,103

## Get AND Function To Return Back Results Other Than True And False

Mar 5, 2014

Here's my formula:

=AND([@[Tenure (Yrs)]]>=5,[@[2016 Sales]]>=150000)

(Where should I enter high and low? Do I need an if formula nested into it?)

I'm trying to get it to read if the customer reads both criteria which is they've been there 5 years and over 150000 sales =
High if not Low.

## Function To Return Single Dimensioned Array

Jan 3, 2008

I am trying to write a function that returns a single dimension array from inputed data. I want this to work for any data, i.e. a single cell, an array in vba or a range. I am using the "for each" staement. However, when I pass an array in the "for each" returns the same range, rather than the elements of the range. I've played around a bit, and the "for each" does what I want on an range if I am not passing the range to a function. Is it because I am passing the range into a function as a variant? Here is the code for the function.

Public Function CreateSingleDimensionArray(ByVal dataToConvert) As Variant

Dim vHolder As Variant
Dim vArray As Variant
Dim lElementCount As Long

lElementCount = 0
For Each vHolder In dataToConvert
lElementCount = lElementCount + 1
Redim vArray(1 To lElementCount)
vArray(lElementCount) = vHolder
Next vHolder
CreateSingleDimensionArray = vArray

End Function

## Formula/VBA To Return Multiple Values In Different Cells

Nov 7, 2008

I am trying to find a way to use information in one cell in order to look up corresponding multiple values on another sheet. The problem that I am running into is that VLOOKUP only returns the first value. I need the values to be calculated in different cells going vertically, not all combined in the same cell as was in an earlier post. I am not looking to sum anything so a pivot table also doesnt work.

Sample data:
A / B / C / D
Identifier / Pub ID / Invoice # / Job #
ABCD1234 / ABCD / 1234 / A41254
ABCD1234 / ABCD / 1234 / B41254
ABCD1234 / ABCD / 1234 / C41254
DCBA4321 / DCBA / 4321 / A56789

etc.

I am looking for it to do this:
A / B
Identifier / Job #
ABCD1234 / A41254
/ B41254
ETC.

I want to enter ABCD1234 into another worksheet and have it return all of the job #'s, but I have a lot of these so I don't want to have to look up how many job numbers there are associated with it and have to enter different formulas into multiple cells. Filtering also isn't an option as there are simply too many cells to calculate.

## Lookup And Return Multiple Results

Mar 31, 2014

I want to look up a particular value and return according results horizontally and vertically. Attached is the excel.

## Lookup Value And Return Multiple Results

May 4, 2014

I have been using this formula to do lookup and return values

"=INDEX(ResultsColumn,SMALL(INDEX((CriteriaColumn=Criteria)*(ROW(CriteriaColumn)-ROW(FirstCellOfCriteriaColumn)+1),),COUNTIF(CriteriaColumn,"<>"&Criteria)+ROWS(A\$1:A1)))"

I'm using this formula in a roster scene to pick up people that call in sick and display their restored job in a different cell. The problem that I am having say for example employee one calls in sick at 2 pm and i assign that job in a corresponding cell to another, then employee 2 calls in sick for the 1pm shift (the call was made after i have already restored employee one a replacement), the formula automatically places the 1 pm in the cell above the 2pm.

Is there a way to stop it from changing the value once a value is entered in a corresponding cell?

## Formula Return The Same Results

Nov 11, 2009

The formula in Col G uses the value in col's B:E. I would like a formula in Col G that will use the 4-digit value in Col F ( same values as Col B:E) and return the same results.

******** ******************** ************************************************************************>Microsoft Excel - PLAY 4 EVE MOSTLY.xlsx___Running: 12.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutF1G1F2G2F3G3F4G4F5G5F6G6=ABCDEFG111/10/0966666666Q211/09/0977667766DD311/10/0977767776T411/11/0972467246S511/12/0977667766DD611/13/0978667866DSheet1 [HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name boxPLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

## Can Index Or Match Return Multiple Results

Nov 27, 2006

I've spent the last week trying to do the following, with little to no success....and I'm running out of hair to pull out!!

I have a worksheet (let's call it DATA) with the following column headers:
* Site Name
* Year Initiated
* Status

plus a whole bunch of other columns of information.

On a separate worksheet (let's call it RESULTS) I'm trying to create a summary of all the Site Names where the Year Initiated = "2004" and the Status = "Active". There will be multiple occurences where this is true.

I then want to create further results where the year = 2005, 2006, etc., etc. I've been trying to use the INDEX function with variations of MATCH, SMALL, ROW, etc., etc., but so far, no luck.

Advanced Filtering is not an option as I need to do further manipulating of the results on the RESULTS worksheet.

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

Column in question is 'U' (FinishDate)
Maximum date that I want to recover is in column 'P' (DATE_COM)
LOOKUP VALUE is found in column 'A' (QUOTE_NUM)

## Return Multiple Results Based On Criteria

Dec 1, 2006

Here's the issue:

On sheet "master" I have a list of goals in column A.

Each has been assigned to at least one person. Each person will have their own sheet that will capture the goals assigned to them. As an example, see Al's sheet.

I am trying to get Excel to look for all of the goals assigned to AL on the Master sheet and list them nicely onto AL's sheet without out blank rows. (and for each, respectively on their own sheet). I could do this with Pivot Tables if the data were displayed differently, but I have been told that I have to display the goal assignments as shown.

I could use "x"s instead of their names to mark the assignment and I could combine the "goal-achieved expectations" and "goal #s" columns if it helps. I am not supposed to use filters either.

Note: Of course, a goal or an assignment could change on the master sheet, but the assignment is more likely to change.

how this done for AL, I can go ahead and create the other sheets.

## Sum Cells And Return Results

Jun 25, 2013

I would like a formula to calculate the following:

If either one of U8 or AP8 are blank return blank (both need to have a number in)
If sum of U8 & AP8

## Multiple Conditions To Return Single Value

Dec 22, 2011

if color(white),pattern(6" tile),finish(gloss),width(>36") & height(>98")then return item ordering# different worksheet datadase.

WALL SELECTIONColor NamePatternFinishExisting
Wall Ht.Wall System stops at:
Wall Repair[SELECT COLOR][SELECT PATTERN][FINISH][SELECT HEIGHT][SELECT HEIGHT][REPAIR]Plum
Wall SpecsSoap Dish Wall SpecsBack Wall SpecsExtra
Wall Specs (if needed)Finished Size:[WIDTH]X[HEIGHT][WIDTH]X[HEIGHT][WIDTH]X[HEIGHT][WIDTH]X[HEIGHT]
Quanity:[QTY][QTY][QTY][QTY]Item Ordering #:

## Multiple Data To Return Single Value

Jan 30, 2014

I think I need to link different formulas here and don't want to use a pivot table. The columns run to row 200 and I have 10 separate spreadsheets. I want to create a new file, a master consolidated view

Each row represents 1 client

Column A Contains Yes or No
Column B Contains the Source (i.e Post, Email, Phone)
Column C contains a range of different dates ie when customer made contact
Column D Contains a currency value.

So the question I need to answer is; Return a sum of Column D for those values who's row attributes are Yes, Post and date of current day +5.

In simple terms who can I contact in 5 days time and what is the expected value.

I have added current date in cell E1. F1, F2, F3, contains text Post, Email, Phone.

May 23, 2014

I am trying to track the number of "F"s within a cell and I'm sure that I'm using the formula correctly -

=COUNTIF(I2:I29,"F").

When I use the insert function feature to walk through setting up the function step-by-step - I see the count once I type in the criteria - however, when I hit 'Ok' the count doesn't appear in the cell - the formula appears. I have cut and pasted the entire worksheet into a new spreadsheet, the problem remains.