LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default How change cell to another character, add comma, & continue next c

It is unclear whether where you want this output at. Since you posted to the
programming group, one could assume you are looking for VBA code; but, if
you are, where do you want the outcome placed... in an array, in another
cell, somewhere else? Personally, I think you are looking for a worksheet
formula (microsoft.public.excel.worksheet.functions would have been a better
newsgroup to use if that is the case); but again, where do you want the
output... in a new column or to replace the contents of C:J for each row?
Anyway, assuming you want a formula, and using a new column (same row as the
data), this formula can be used as a starting point...

=A2&" "&TEXT(B2,"mm/dd/yyyy")&" "&SUBSTITUTE(TRIM(IF(C2="T","0","")&
" "&IF(D2="T",1,"")&" "&IF(E2="T",2,"")&" "&IF(F2="T",3,"")&" "&IF(
G2="T",4,"")&" "&IF(H2="T",5,"")&" "&IF(I2="T",6,"")&" "&IF(J2="T",
7,""))," ",",")

Copy it down as needed.

--
Rick (MVP - Excel)


"ILoveMyCorgi" wrote in message
...


"ILoveMyCorgi" wrote:

I have an Excel spreadsheet that has as a header row: #, Date, Per0,
Per1,
Per2, Per3, Per4, Per5, Per6, Per7. The rows below have the number,
date,
then for Per0 through Per7 may have a T in the cell. Sometimes the cell
may
have another character other than a T. What I need to do is take the T
and
change it to, let's say a 3 [for Per3] then add a comma and continue to
the
next cell [if there is another T] and add, hypothetically a 5 for Per5...
and
so on until the end of the rows with a number and date.


The outcome shoudl look like:

12345 09/25/2008 3,5
If anyone can help
me, I'd appreciate it. Hope you have a great day and a good weekend....
ILoveMyCorgi


 
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
How change cell to another character, add comma, & continue nextc dan dungan Excel Programming 1 September 26th 08 06:37 PM
How can I change the color of the cell when someone enter any number or character? [email protected] Charts and Charting in Excel 1 August 13th 07 02:47 PM
Change first character in a cell houghi Excel Discussion (Misc queries) 5 May 24th 07 04:33 PM
255 Character limit / Comma Delimited Import Problem Arturo Excel Discussion (Misc queries) 0 September 20th 05 02:34 AM
Change Event.....Cell character count CLR Excel Programming 5 February 1st 04 01:16 AM


All times are GMT +1. The time now is 11:57 AM.

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"