# Returning String From One Cell Based Upon Multiple Cells

May 22, 2013

I need to return the specific text of a cell based upon the text in multiple cells.

Worksheet as follows:

Asphalt Sub:
BLDG1-Backwash 1
*BLDG1*
*Sub*
BLDG1-Backwash 1 OverEx
*BLDG2*
*Sub*

[Code].....

I have three columns thus far. I need to add another column and search all items in Column A using the criteria in Columns B and C. For instance I need to search for BLDG1-Backwash Sub: and place it into column D using the criteria in Columns B and C.

If possible, I would also like to remove both the words, BLDG1 and Sub from the result so then it only shows "Backwash".

My spreadsheet is much larger than this and I have muliple buildings I am dealing with, sometimes 30-40.

## Returning Row Numbers Where One Word Contained In Text String - Multiple Occurrences

Oct 30, 2013

I am trying to identify the row(s) where a match occurs when there can be multiple occurrences of the match.

A
B
C

1
john brown
Brown
True

2
Cathy Smith

3
Brown excavating company

4
XYZ Corp

5

The first test I ran in cell C1 with the information above was to determine if "Brown" was located in the range of A1:A5 using formula:
=IF(ISNUMBER(MATCH("*"&B1&"*",A1:A5,0))=TRUE,"True","False")

In the case of the word "Brown" it occurs in the range of A1:A5 three times, so the result of the above formula would be "True"

Now what I would like to do is return the locations, in this case the row number(s), where the word brown is contained range of A1:A5 because in the case of the word Brown, it occurs three separate times in the range of A1:A5. I would like the resulting value of the formula in this case to be "1, 3, 5" indicating the word Brown occurs in rows 1, 3, and 5. The formula also needs to work in case there is only one match as well.

I tried using the below array formula:
={MATCH(FALSE,ISERROR(SEARCH(B1,'Working List of Vendors'!\$A\$1:\$A\$5)),0)}
But it would only return the first occurrence of the match which in this case would be row 1, or "1"

## Summing Multiple Items Based On A String In A Cell?

Jan 24, 2014

I have columns (1-7) containing values of time these columns are labelled G,R,A,S,D,B,T by 850 rows (which are locations/jobs)

The next set of columns (1-7 determins what week the work takes place) so you will get a G in a cell or GR etc.

I would like a formula to work out the sum of the time columns by the code in the corresponding cell - I am stuck!

Seantc example.xlsx

## Referenced Cells Returning Zeros: Can These Be Made Blank Or String Data?

Aug 30, 2007

I have a summary worksheet consisting of columns that are referenced to other sheets within the same workbook.

If the cell in the 'referring' (original) sheet is blank then the forumula returns a zero instead of a blank in my summary worksheet, which is messing up some other calculations.

Is there a way to make these cells truly blank, or possibly into string variables instead, so that they do not interfere with my calculations?

## Returning Boolean If A Cell Contains A String

Mar 25, 2013

Seems like this one should be pretty easy but I'm stuck... I just want to return a boolean based on whether the currently active cell contains the character "#". I've been trying to use the find method but I can't figure out how to convert a match or lack of a match to a boolean.

## Assign Specific Number To Cells Based On Another Cell Value In String

Feb 27, 2013

So I have this list (I made it a little bit shorter).

So what you see is two different tasks (01 and 02) and three different conditions (A, B and C). In column B you see the result I would like to have. '/Searchtask_01.html' in A1 belongs to conditions A, because it is in session A. However, '/Searchtask_01.html' in A10 belongs to conditions B, because it is in session B.

How to get the results in B with a formula?

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

## Returning A Row Of Cells Based On A Color

Apr 25, 2007

I am having a bit of a problem writing a formula that works under the specific conditions that I need.

I have a range of 6 cells, A1:A6 which contain text
I have formatting that turns that row red based on specific conditions. The problem is that if A1:A6 is red, I then need the text in those cells to be copied to Sheet 2 B1:B6.

## Create Summary By Returning Two Cells From Multiple Worksheets

Apr 17, 2013

I am using Multiple worksheets ( 30 to 35 ) of same format to calculate Individual scores of an event. Each sheet contains Participant Name in C4 and Score in E 21.

Macro to provide a summary sheet which returns C4 & E21 in all the sheets..

The score in E21 is calculated thru another macro done with excel recording feature..

## Matching Cells Across Sheets And Returning Color Value Based On The Sheet?

Dec 24, 2013

I have a set of sheets on a workbook that contain addresses, which are all combined on the first sheet (as you can see in the attached file). I would like to use a formula to compare the addresses on the Main sheet with the other sheets, then return in the D column of Main a colored cell indicating on which sheet the address was found on; different colors for different sheets. I tried to figure out some conditional formatting, but to no avail. Also, on occasion I have spreadsheets with 5 or 6 sheets containing these mixed addresses. Is there a solution that won't be limited to just a few sheets for comparison?

Excel Help.xlsx

## Pick Cell Based On Multiple Cells

Feb 5, 2009

I want the 'Model Number' to automatically be picked based on the numbers entered into Sheet1 B1 & B2. The model numbers are listed on Sheet2.

## Formatting Multiple Cells Based On Value Given In One Cell

Nov 1, 2013

How multiple cells can be formatted based on one cell value. See the screenshot attached to understand what I am trying to achieve. I am very new to excel formatting, vba etc.

ExcelFormattinQs.jpg‎

## Returning Multiple Cell On The Basis Of Minimum Value

Apr 8, 2013

i have the sheet which have the table which look like

A 5

B 4

C 1

D 1

now i want is there is any way to find minum value in task done colium and return the person name and like in this exapmle, 2 person have done have done minium work.. it tell me both those name

## Fill Multiple Cells Based On The Result In One Cell?

May 31, 2014

When I enter barcode X in cell A1, I want B1 to say supplier and C1 to say product name and D1 to say package quantaty etc.

And if I enter barcode Y in cell A2, I want B2 to say different supplier, and so on, hopefully you get the picture.

## Place Value In Multiple Cells Based On Cell Variable

Nov 26, 2009

I'm trying to place the value of "X" in multiple cells based on a cell variable (i). For example, if (i) is evaluates to 35, the following code ...

## Hyperlinking Multiple Cells Based On Another Cell Contents

Feb 23, 2012

I have just started to learn how to use vba in microsoft excel. Over the past few days i have been creating a drawing register and have incorporated multiple routines based on searching this forum. Up until this point i have foud everything i needed on this forum, but now i cannot work out how to creat a routine that does the below.

The setup
*I have a folder called Zircon Plant
*That folder contains 3 folders 01. Superseded, 02. PDFs and 03. Documentation (the 01. Sup...etc. is the actual folder name, the 01, 02 and 03 isnt distinguishing the 3 folders)
*The Register is located in 03. Documentation
*The PDFs i want to hyperlink to are located in 02. PDFs

What i want to do
*i have 2000 rows of drawing names
*the drawing name in excel is spread over 5 side by side cells on each row (rows 21 - 2020) so for example the first row the information is in cells (H21, I21, J21, K21 ,L21)
*the cells i want to contain hyperlinks are V21 - V2020

so what i want is when excel opens up (i already have another script running at startup so i will be placing this after the other startup routine i have) i want it to search in folder 02. PDFs using the contents in (for example the first row (21) and colums HIJKL contain (H21)4CP(I21)-(J21)D(K21)-(L21)55000) each row and combine those cell contents to find the file name 4CP-D-55000.pdf. I then want it to go down every row until row 2020 untill it has added all pdfs.

(The second row is (H22)4CP(I221)-(J221)D(K221)-(L21)55001.....file name would be 4CP-D-55001.....third row would be 4CP-D-55002 etc...)

If such a pdf with that name doesnt exist, i want the cell (for example v21) to read "PDF not available"

based on a search here i have been able to do this for 1 cell, but dont want to do 2000 seperate routines. the current routine i have for it to work on one cell is

' Select PDF range
ActiveSheet.Range("u21").Select

I also have multiple sheets. the first sheet is D - Documentation. I will eventually copy this routine 4 more times as i will be able to work out how to apply it to the other sheets

## Returning Multiple Values With Duplicate Cell Reference

Jul 11, 2014

From the following example:

A1 TAG B1 mileage
G10-1622 15246
G10-1622 15246
G10-1583 15246
G10-1622 28659
G10-1195 28659
G10-1622 28659

desired results

Enter tag in cell
G10-1662
Mileage
15246
15246
28659
28659

I would like to enter a particular TAG # in I5 and return all the mutiple associated data

See attached : tire2.0.xls‎

## Listbox Dropdown Returning Multiple Cell Information

Feb 5, 2014

I have this data inputted into excel sheet: [URL] .......

This data is in tab called Shops, that has 8 columns of information. In another sheet called control, I have the shops names from row A in a list box. What I am trying to do is when whatever shop is selected in the list box then output the shop information from that row in 8 different cells in another sheet. I have a list of about 200 shops that I need to input.

So if we pick shop, Abc inc from the list box how can I get excel to look up the information in Abc inc in the shops tab of information and then display them on other cells in different sheets.

I have the same issue with making a list box of people names. I made the list box but I want to make it so it will display there phone number and e-mail address in 2 other cells once you pick there names. I had some luck using the if command on smaller list boxes but I can't figure out how to get multiple cells of information to come out correctly

## VBA Returning Cell Range From Multiple Rows And Columns?

Apr 24, 2014

I'm attempting to match a name with the row and column numbers of data that is laid out in a grid format. It looks something like this:

Denson
Matthews
Smith

[Code]....

This works just fine, except for the fact that once in awhile the same name will appear in the grid twice, and the row and column returned will be off (it will return the row for one of the Smiths, for example, and the column for the other).

I know why this is occurring so I'm looking for a better way to do this. The good part is that I don't necessarily need both locations returned for each "Smith" ; I just need the correct row and column for at least one of the instances. I'm looking for a better way to do this.

## Coloring Multiple Cells Of Excel Sheet Based On Value Of Particular Cell

Nov 27, 2012

I've an excel sheet...where I want to color the cells on the basis of following condition:

If Cell E is non-empty then cell A, Cell B, Cell C, Cell D, Cell F, Cell G, Cell H and Cell I can not be empty. If any one of the cell is found empty then color the respective cell in red!!If collectively all the cells Cell A, Cell B, Cell C, Cell D, Cell F, Cell G, Cell H and Cell I contains a value and Cell E is empty then highlight the Cell E in red color.

I want to implement this in module section...

## Autopopulate Saturdays In Multiple Cells Based On Month Date In Another Cell

Aug 19, 2014

get other cells in a spreadsheet to populate with the Saturdays of a month based on the date input in another cell.

Example
A1 = October 2014
The following cells would automatically display:
A2 10/04/14
A3 10/11/14
A4 10/18/14
A5 10/25/14
A6 11/01/14

Then if cell A1 is changed to March 2015 the following cells would automatically display:
A2 03/07/15
A3 03/14/15
A4 03/21/15
A5 03/28/15
A6 04/04/15

I can't seem to find a way to get just the Saturdays. +7 doesn't work because Saturday is not always the 7th day of the month.

## Excel 2010 :: Input Multiple Cells Based On Master Cell?

Dec 9, 2011

I am trying to create a UserForm in Excel 2010 that will look for a part from our database (or on a specific Sheet, possibly a hidden sheet), then add specific data from that part's row into a new line.

More Specifically:

| Part # | Description | Category | SubCategory | Cost | Labor Hours | Weight | Etc |

I want to be able to input the Part #, and have it automatically add specified information to sheets 1 and 2 and those two differ. 1 is our Quote Sheet, and 2 is our bill of materials.

Also, I need each piece of information to go to a specific column (ex. Cost always goes to Column K)

What I have now is a broken UserForm that references a DOC file with a Table, but I need something a good but more complex.

Ideally, what I want is to have 4 ListBoxes where you choose Category --> SubCategory --> Make --> Model then have several CheckBoxes below that would determine whether to add a part (Cost, Labor, Weight).

The reason for this is because we have no need for the Cost or Labor Hours in our Bill of Materials, but need that information for our Quotes. And we generally don't need Specific Dimensions in our Quotes, but DO need them in the Bill of Materials...

Can I make it so that it will insert Pre-Specified information into both sheets at the same time?

## Search For Multiple Text Strings In A Cell - Return One Of Multiple Corresponding But Different String

Mar 11, 2014

I have a spreadsheet with 1,000 rows of data.

Each Cell in Column A has a different long text string.

I need to see which (if any) of 10 specific small text strings exist within each long text string. Depending on which small text string is found I want to return a 3 digit code. If no small text string is found I want to return "Not Found"

E.g.:
- Cell A2 contains "randomtext,randomtext,APPLE,randomntext"
- I want to see if Cell A2 contains any of the words APPLE, ORANGE, CARROT.

Q: What is the most elegant way to accomplish this within a single formula that I could paste into each cell in Column B?

## How To Check Multiple Cells Have Same String

Jul 9, 2013

I want to check if cells C1, D1 and E1 contain the same name. For example if the cells all contain the 'Joe Bloggs' (or whatever the name variable happens to be) then cell F1 should say "Yes", else "No".

## Split Into Multiple Sheets Based On Beginning String In Set Column?

Apr 12, 2014

I have used this code below to split a large excel file into multiple sheets from matching column data, but now I need to split it by a partial match (set number of characters from the beginning) from beginning of the column data.

For Example:

[Code]....

So with the code provided below using column 3 I would get 10 different sheets since none of the data in the column is identical. I want to modify the code (or come up with new code) so I can set the number of characters to compare from the beginning of the data in the set column and split into sheets based on that. So if I set it to the first 4 characters in column 3 I would receive only 5 sheets sheets: Safe, Fail, Dont, Poop, & 21-4.

What are the modifications or new code needed for this? I have searched for a bit with no luck, just keep finding code to check the full cell data for matches in a set column like this code I have:

SPLIT DATA FROM ONE SHEET TO MULTIPLE SHEETS

[Code] ......

## Search Text String And Return Value Based On Multiple Criteria?

Apr 8, 2013

Here is an example of the data I get each day Letter order granting Sabine Pass Liquefaction, LLC's et al 4/16/12 request to add an alternate water source etc under CP11-72.Letter order granting Cameron LNG, LLC?s 4/5/13 filing of a request to introduce natural gas or process fluids into the BOG Liquefaction Project under CP12-15.Letter order accepting NorthWestern Corporation's 8/7/12 submittal of revisions to its transmission planning process to comply with the Commission's June 8, 2012 Order under ER11-2932.Letter order approving Public Service Company of New Mexico's 12/7/12 filing of a joint Offer of Settlement with Navopache Electric Cooperative, Inc under ER11-4534 et al. How can I set up my spreadsheet and what formulas can I use to search and return a value for each text string based on the attached table (column B)?

E3a7qta.png

## Hide Rows Based On Multiple Columns Formula Returning Empty Text ""

May 13, 2008

I would like to rows based on multiple column conditions criteria. ie., if the columns N, O, P values are "", then hide the particular row. The logic given in the website here, i tried But, it is not 100% working. It works for a few rows at the start of the database & it works for the rows at the end of the database. In between, for a few rows, even if the column values are "" it does not hide those rows.

## How To Get Referenced Cells Returning Blank Cell Instead Of Zero

Apr 6, 2014

Referenced cells returning zeros: can these be made blank or string data?

But why I still get the value 0 instead of blank cell when I press ctrl+shift+enter?

My formula = IF(U15="Bank", PROPER(E15),"")
and E15 = VLOOKUP(B15,'Customer Data'!\$D\$6:\$K\$100,3,FALSE)

## Shading And Locking Multiple Cells From Input Based On Value In Separate Single Cell

Sep 23, 2013

Now the problem, Each client has a sheet in a workbook. In each sheet, I input the number of days of service available to that particular client in a single cell. We'll say cell [G8] is the cell used for this input in all sheets. If the client has 30 days of service available then we type [30] in cell [G8]. Each sheet is a 100 day template. I want to shade in dark grey and lock from input the days NOT available to the client based on the days of service input in cell [G8]. If 30 days of service are available in cell [G8] then the remaining 70 days on the 100 day template would be shaded dark grey and locked from input. That is, day 31 through day 100 of the template would be locked and shaded. Each individual day has multiple cells in a column. I want to lock and shade each column of cells in each day not available.

## Macro That Will Auto Color Multiple Cells Based On Data Displayed In One Cell

Jan 7, 2013

I am trying to find a way to write a Macro that will auto color multiple cells based on what data is displayed in one cell. The cell I want to reference is a vlookup cell.

Basically this is a part label. And depending what part is selected from the list my vlookup will display its position on a vehicle(i.e.. FR, FL, RR, RL, Etc..). So if vlookup comes back with FR I want the various cells on the label to be orange, etc..

ALSO: if there is a way to embed it so it does this automatically (rather than run the macro each time).