ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Strip Values From Cells To Create New Cell Value (https://www.excelbanter.com/excel-discussion-misc-queries/132622-strip-values-cells-create-new-cell-value.html)

[email protected]

Strip Values From Cells To Create New Cell Value
 
Hello everyone. I am a beginner and need some help from the forum!
here is the problem I have:
My excel sheet has multiple fields with data in it.Ex:

Type Use
____ ___
Rock Build house
Sand Play on it
Gravel Drive on it

I want to take the first letter of the Type value (R from Rock) and
Concatenate it with the first letter of Use column (Build from Build
House) and concatenate it with an user input which is constant for all
rows. I need this value RBuildxxx on the same row as Rock. I would
also like to know how to select the data range (for the # of rows I
need) and how to select the target row. thanks a lot for the help!


Earl Kiosterud

Strip Values From Cells To Create New Cell Value
 
I think you meant the first word of column B. Presuming a space should be used as the
delimiter (between "Build" and "House") try this

=LEFT(A2,1) & LEFT(B2,SEARCH(" ",B2,1)-1) & "xxx"

If the user input is in a cell, like C2, then use:

=LEFT(A2,1) & LEFT(B2,SEARCH(" ",B2,1)-1) & C2
--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
wrote in message
oups.com...
Hello everyone. I am a beginner and need some help from the forum!
here is the problem I have:
My excel sheet has multiple fields with data in it.Ex:

Type Use
____ ___
Rock Build house
Sand Play on it
Gravel Drive on it

I want to take the first letter of the Type value (R from Rock) and
Concatenate it with the first letter of Use column (Build from Build
House) and concatenate it with an user input which is constant for all
rows. I need this value RBuildxxx on the same row as Rock. I would
also like to know how to select the data range (for the # of rows I
need) and how to select the target row. thanks a lot for the help!




[email protected]

Strip Values From Cells To Create New Cell Value
 
On 27 Feb, 20:06, "Earl Kiosterud" wrote:
I think you meant the first word of column B. Presuming a space should be used as the
delimiter (between "Build" and "House") try this

=LEFT(A2,1) & LEFT(B2,SEARCH(" ",B2,1)-1) & "xxx"

If the user input is in a cell, like C2, then use:

=LEFT(A2,1) & LEFT(B2,SEARCH(" ",B2,1)-1) & C2
--
Earl Kiosterudwww.smokeylake.com
wrote in message

oups.com...

Hello everyone. I am a beginner and need some help from the forum!
here is the problem I have:
My excel sheet has multiple fields with data in it.Ex:


Type Use
____ ___
Rock Build house
Sand Play on it
Gravel Drive on it


I want to take the first letter of the Type value (R from Rock) and
Concatenate it with the first letter of Use column (Build from Build
House) and concatenate it with an user input which is constant for all
rows. I need this value RBuildxxx on the same row as Rock. I would
also like to know how to select the data range (for the # of rows I
need) and how to select the target row. thanks a lot for the help!


Thanks! Should have mentioned that I need to do it from a macro. There
are going to be multiple rows that I need to modify, and I would like
to use a macro that will do it for the selected range of rows. thanks
again!



All times are GMT +1. The time now is 05:53 PM.

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