#1   Report Post  
Posted to microsoft.public.excel.misc
CB CB is offline
external usenet poster
 
Posts: 60
Default Add Beginning Text

I have the following in my spreadsheet:
Col A Col B Col C Col D
Address Client TextC1 061
Address Client TextC2 051
Address Client TextC3 041
Address Client TextC4 041
Address Client TextC5 061
Address Client TextC6 051

I need to add to column c textn Dallas every time 061 shows up in col d, St
Louis every time 051 shows up in col d and Nashville every time 041 show up
in col d.

Any one have any suggestions?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Add Beginning Text

On Apr 29, 2:44*pm, CB wrote:
I have the following in my spreadsheet:
Col A * * *Col B * * *Col C * * *Col D
Address *Client * * *TextC1 * * *061
Address *Client * * *TextC2 * * *051
Address *Client * * *TextC3 * * *041
Address *Client * * *TextC4 * * *041
Address *Client * * *TextC5 * * *061
Address *Client * * *TextC6 * * *051

I need to add to column c textn Dallas every time 061 shows up in col d, St
Louis every time 051 shows up in col d and Nashville every time 041 show up
in col d.

Any one have any suggestions?


Your best bet woudl be to ahve a helper column. So in Column E you
woudl have =IF(D1="061",C1&"St Louis,IF(D1="051",C1&"Nashville",IF(so
on and so on

Or you coudl use a macro to go through each cell and if the number =
something then do whatever. I hope this helps.

Jay
  #3   Report Post  
Posted to microsoft.public.excel.misc
CB CB is offline
external usenet poster
 
Posts: 60
Default Add Beginning Text

Hi Jay,
Thanks for your help. This is a report that will have to be formatted at a
minimum every week. If I use the formula you suggest I would also have to do
a paste special to get the correct value in the field and delete the extra
columns.
Any idea on how to get a macro to automate this?
Thanks Again,
CB

"jlclyde" wrote:

On Apr 29, 2:44 pm, CB wrote:
I have the following in my spreadsheet:
Col A Col B Col C Col D
Address Client TextC1 061
Address Client TextC2 051
Address Client TextC3 041
Address Client TextC4 041
Address Client TextC5 061
Address Client TextC6 051

I need to add to column c textn Dallas every time 061 shows up in col d, St
Louis every time 051 shows up in col d and Nashville every time 041 show up
in col d.

Any one have any suggestions?


Your best bet woudl be to ahve a helper column. So in Column E you
woudl have =IF(D1="061",C1&"St Louis,IF(D1="051",C1&"Nashville",IF(so
on and so on

Or you coudl use a macro to go through each cell and if the number =
something then do whatever. I hope this helps.

Jay

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Add Beginning Text

On Apr 29, 3:35*pm, CB wrote:
Hi Jay,
Thanks for your help. *This is a report that will have to be formatted at a
minimum every week. *If I use the formula you suggest I would also have to do
a paste special to get the correct value in the field and delete the extra
columns. *
Any idea on how to get a macro to automate this?
Thanks Again,
CB



"jlclyde" wrote:
On Apr 29, 2:44 pm, CB wrote:
I have the following in my spreadsheet:
Col A * * *Col B * * *Col C * * *Col D
Address *Client * * *TextC1 * * *061
Address *Client * * *TextC2 * * *051
Address *Client * * *TextC3 * * *041
Address *Client * * *TextC4 * * *041
Address *Client * * *TextC5 * * *061
Address *Client * * *TextC6 * * *051


I need to add to column c textn Dallas every time 061 shows up in col d, St
Louis every time 051 shows up in col d and Nashville every time 041 show up
in col d.


Any one have any suggestions?


Your best bet woudl be to ahve a helper column. *So in Column E you
woudl have =IF(D1="061",C1&"St Louis,IF(D1="051",C1&"Nashville",IF(so
on and so on


Or you coudl use a macro to go through each cell and if the number =
something then do whatever. *I hope this helps.


Jay- Hide quoted text -


- Show quoted text -


Sub CopyStuff()
Dim Rng As Range
Set Rng = Range("A1", Range("A1").End(xlDown))
Rng.Copy Destination:=Range("B1")
End Sub

This is how you woudl copy all cells in A1: through how many are
filled into column B. I am sure you can use this code to build on.
If you do not know how, open excel and click Alt+F11. Insert a module
into the book that you are working on, add this code and manipulate as
needed. change it to your ranges and so forth. I hope this gets you
on the right track.

Jay
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I replace a ' at the beginning of a text cell using Replace Hilde Excel Discussion (Misc queries) 4 September 10th 07 06:22 PM
Can I match the beginning of text in an Excel cell? David Greggs Excel Discussion (Misc queries) 1 February 17th 06 08:06 PM
Removing numbers from the beginning of a text string Night Owl Excel Worksheet Functions 3 May 13th 05 05:52 PM
How to reformat numbers stored as text (apostrophe at beginning) Dave Excel Discussion (Misc queries) 1 May 11th 05 02:34 AM
add characters to beginning of text Natalie Excel Worksheet Functions 3 March 4th 05 12:56 PM


All times are GMT +1. The time now is 07:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"