View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
ILoveMyCorgi ILoveMyCorgi is offline
external usenet poster
 
Posts: 55
Default How change cell to another character, add comma, & continue ne

I dd change the code but the output I wanted was more on the lines of the
formula: =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,""))," ",",") .

I was hoping for a quick and easy RUN once I extract my data.


"Rick Rothstein" wrote:

Ah, I see. Actually, the intent was for the you, and the OP, to change the
example worksheet names I used in my code to whatever actual worksheet name
you are using in your own workbook. In other words, where my code
had.this...

With Worksheets("DataSheet")

the you, and the OP, were supposed to change "DataSheet" to whatever name
your own worksheet has. So, for example, if your data was located on
"MyDataSheet3", then the above code line was to be changed to this...

With Worksheets("MyDataSheet3")

and similar change should be made where I used this...

With Worksheets("OutputSheet")

in my code also (using the actual name you gave to your output worksheet in
place of my example worksheet name of "OutputSheet"). The key thing to note
is the code was supposed to be changed to match your actual conditions,
*not* the other way around. If the OP had posted the worksheet names for us
in the original posting, I would have used them in my code; since the OP
didn't, I simply made up example names instead.

--
Rick (MVP - Excel)


"dan dungan" wrote in message
...
Hi Rick

First of all, I take your posting to mean you did not get the error
message
that the OP got (in other words, my code ran "error" free on your
system).


I got the same error: 9 Subscript out of range until I used the same
worksheet names in your code. Now it runs error free.

Thanks for your time and input.

Dan