How to find and replace all the words in a cell with a new word in excel - excel

I have a huge data set in excel. I have a column with list of certain information about fruits and Im trying to replace all the cells with BA and BSC in column A with a new word fruits as given below in column B in excel. any new suggestions will be appreciated.
example
A B
KFC34R BA red and yellow fruits
KFC34R BSC red and yellow fruits
KFC34R BA red and yellow fruits

Try =SUBSTITUTE(SUBSTITUTE(A1, "BA", B1), "BSC", B1))

Related

Excel Formula to return all rows and columns corresponding to search string

I'm trying to lookup two sheets in Spreadsheet.
One has the search value and other has all the data corresponding to the search string.
I'm trying to find a formula that will search the value and return all the corresponding rows. Another thing is that it has to return the entire row and columns correspoing to that string and not only one.
I'm using this Vlookup formula as of now but any help will do:=
ArrayFormula(VLOOKUP(A1,Sheet2!A2:AE196,{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},FALSE))
A2:is the seach string, and used array to define the Columns to be returned.
But the formula returns only one row corresponding to the string and not all the rows.
Is there a formula that returns all rows and entire values in those rows correspoinding to the search string?
EX :Sheet1:search criteria
Search
Apple
Mango
melon
Ex:Sheet 2: Data
Name
Colour
no
Apple
red
5
Banana
yellow
3
Apple
red
25
Mango
yellow
1
Mango
yellow
10
Expected result for Apple(A1 in the formula) as search string:
Name
Colour
no
Apple
red
5
Apple
red
25
Actual result:
Name
Colour
no
Apple
red
5
You should use FILTER or QUERY
=FILTER(Sheet2!A2:AE196,Sheet2!A2:A196=A1)
=QUERY(Sheet2!A2:AE196,"select * where A='"&A1&"'",1)

append to existing values if condition is true

I want to compare the values row by row from sheet1-colors with sheet2-darkcolors
if they are both matching append the row values d and e to the fruits column in sheet 1
basically
sheet1 colors |blue |=== sheet2 darkcolors |blue| ----> fruits+yummy+yuicy
sheet1
colors
fruits
blue
bananay
red
apple
green
kiwi
sheet2
darkcolors
d
e
blue
yummy
juicy
black
tummy
fruicy
green
tummy
goosy
result
colors
fruits
blue
banana+yummy+juicy
red
apple
green
kiwi+tummy+goosy
I tried using `IF` combined with `XLOOKUP` but could not get it running together
Try-
=IFERROR(TEXTJOIN("+",TRUE,B2,INDEX(TRANSPOSE(Sheet2!$B$2:$C$4),,MATCH(A2,Sheet2!A2:A4,0))),B2)

Excel How to insert value based on todays date

I have 4 columns in excel. Date, Apple, Banana and Oranges. I have a different sheet where I have a header called "Today's Production" Under the header I have Banana, Apple and Oranges listed. How do I populate these fields
Screenshot added
If the first cell of your table were in A1, for the bananas column, you can just use something along the lines of
=SUMIFS(B1:B10,A1:A10,TODAY())
Then for apples, you would adjust your B column to C, and for oranges, adjust B to D

Excel: How to add a column from other sheet based on a key column?

I have 2 list. Both have a lot of column. I would like to insert a column from Sheet2 to Sheet1 based on a ceratin key column. Also sheet2 have much more rows than sheet1 so it ll be inserted only partly and still there ll be elements with no matches. For an example:
Sheet1:
Names ID Car Color
John 1 Audi Empty
Andy 4 Toyota Empty
Mike 3 BMW Empty
Tony 2 Suzuki Empty
Sheet2:
ID Cost Color
6 200 Blue
3 200 Red
4 300 Green
5 100 Red
1 50 Black
I would like to get the "color" from Sheet2 to Sheet1 by using the "ID". Using Excel 2010. I suspect I need INDEX+MATCH combination, but the examples I can find are not detailed and more simple so I coudn't figure out how to use them.
How about inserting this formula on Column D in the first row, then dropping the formula down:
=VLOOKUP(B1,Sheet2!$1:$1048576,3,FALSE)
Or to find the column that contains "Color", use Index Match Match, as follows:
=INDEX(Sheet2!$1:$1048576,MATCH(Sheet1!B2,Sheet2!A:A,0),MATCH("Color",Sheet2!$1:$1,0))
This will find the value in Column B in Sheet2 and give you the row number, then it will find the Column that contains "Color" and return the Column number, with those two numbers Index will return your color.

Excel Bring back Unique Record and description

I have a table in excel that I am bringing in from Access.
I can get a unique Name from the list, but I don't know how to bring the description in the format below.
This is how the table in excel looks like:
Name Description
John Black
John Blue
John Black
Mary Green
Mary Blue
Jim Yellow
Jim Yellow
Jim Black
I want it to look like this so I'll have two field name and description will be both unique
Name Description
John Black, Blue
Mary Green, Blue
Jim Yellow, Black
thanks!
First Remove Duplicates. If Name is in A1, in C2:
=IF(A1=A2,C1&", "&B2,B2)
in D2:
=A2=A3
Copy both down to suit. Select all, Copy, Paste Special, Values over the top, filter on ColumnD to select TRUE, delete selection, delete ColumnD and ColumnB.

Resources