ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   auto insert (https://www.excelbanter.com/excel-discussion-misc-queries/124491-auto-insert.html)

jason2444

auto insert
 
want to know if it is possible to write a formula that will check one column
for specified variables and depending on the variable fill in a seperate
column with the text assigned to that variable

like if column A1 contains the words Chevy,Chevrolet then put the word Chevy
in A2 or if contains the words dodge then put the word dodge in A2.

Sean Timmons

auto insert
 
Not sure which you're looking for, so I'll provide 2 answers to your question.

If you only want column B to equal the value in column A
in cell B2, type:
=A2

If you're saying you have a value in A2, and, let's say you have another
worksheet with the same value as A2, with a corresponding variable in, say,
F2, then:
=VLOOKUP(A2,sheet1!A:F,6,FALSE)
will look for your A2 value on sheet2 of your workbook in column A and
return the value in column F. (the 6 refers to the column #, F is the 6th
colun from A - F). FALSE is there so that you will only get a corresponding
value if cell A2 is found in column A of the new table.

"jason2444" wrote:

want to know if it is possible to write a formula that will check one column
for specified variables and depending on the variable fill in a seperate
column with the text assigned to that variable

like if column A1 contains the words Chevy,Chevrolet then put the word Chevy
in A2 or if contains the words dodge then put the word dodge in A2.


jason2444

auto insert
 
no what i am trying to do is in column A1 i have a sentence
I want to check that sentence for key words that i designate
if it finds the key then in A2 I want to put a word that is related to that
key word
so check sentence for
chevy
chevrolet
GMC

Dodge

Ford
F-150
F-250
F-350

if it finds
chevy
chevrolet
GMC

then want the word Chevy to be inputed in A2

if it finds any of these words in the sentence
Ford
F-150
F-250
F-350

then in A2 want to input the word Ford

"Sean Timmons" wrote:

Not sure which you're looking for, so I'll provide 2 answers to your question.

If you only want column B to equal the value in column A
in cell B2, type:
=A2

If you're saying you have a value in A2, and, let's say you have another
worksheet with the same value as A2, with a corresponding variable in, say,
F2, then:
=VLOOKUP(A2,sheet1!A:F,6,FALSE)
will look for your A2 value on sheet2 of your workbook in column A and
return the value in column F. (the 6 refers to the column #, F is the 6th
colun from A - F). FALSE is there so that you will only get a corresponding
value if cell A2 is found in column A of the new table.

"jason2444" wrote:

want to know if it is possible to write a formula that will check one column
for specified variables and depending on the variable fill in a seperate
column with the text assigned to that variable

like if column A1 contains the words Chevy,Chevrolet then put the word Chevy
in A2 or if contains the words dodge then put the word dodge in A2.



All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com