wdprice3 BinaryBuffonary 45912 Posts user info edit post |
yeh, this isn't tech talk #2. and google isn't helping.
I have a bunch of names in separate cells in excel. is there anyway to take these cells and create folders with the same names? no vba, unless you can do it in the next 5 minutes 10/14/2008 6:32:30 PM |
OhBoyeee Suspended 2164 Posts user info edit post |
what ever happened to the good ole fashion pen and paper methods? 10/14/2008 6:33:50 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
I don't think I have the penmanship to write on my hard drive 10/14/2008 6:34:22 PM |
OhBoyeee Suspended 2164 Posts user info edit post |
yes, that could pose quite a quandry for you, queer. Just joking, you prolly like girls. 10/14/2008 6:57:24 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
Yeh, I like girls. 10/14/2008 8:43:45 PM |
ReceiveDeath INEED2 GET HIRITENOW 70284 Posts user info edit post |
I was going to respond with "gay boobs" initially
I feel like I should have done that 10/14/2008 8:44:52 PM |
ncsu2002 Veteran 248 Posts user info edit post |
this should work, if the cell contents is formatted like: Cell A1 = C:\windows\desktop\NewFolder\
Sub MakeFolder() MkDir (Range("A1").Text) End Sub
-----
If you just have the target folder name in the cell then add this to the function:
Dim strDirname, strDefpath As String On Error Resume Next ' If directory exist goto next line strDirname = Range("A1").Value ' New directory name strDefpath = "C:\My Documents\" 'Default path name
MkDir strDefpath & strDirname 10/14/2008 10:13:25 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
lol, wut? 10/14/2008 10:20:16 PM |
aaronburro Sup, B 53050 Posts user info edit post |
seriously. dude just gave u your answer. now fucking copy and paste 10/14/2008 10:20:59 PM |
IMStoned420 All American 15485 Posts user info edit post |
If you vote for Obama he'll fix it... 10/14/2008 10:21:29 PM |
Jax883 All American 5562 Posts user info edit post |
He's got < 250 posts.
Odds are he's telling the truth. 10/14/2008 10:23:10 PM |
ncsu2002 Veteran 248 Posts user info edit post |
^ thanks... I think...
It is not in copy paste form, because to don't know the cell format and range data. Nor the version of excel. It is however a good start.. 10/14/2008 10:26:40 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
is that vba?
excel 2007
in row 1, I have column titles, down each column are names (text)
[Edited on October 14, 2008 at 10:38 PM. Reason : where do I put that code? I know nothing about macros and shit] 10/14/2008 10:28:28 PM |
ncsu2002 Veteran 248 Posts user info edit post |
Yeah, its VB. Use the function to create a macro.
The names(in separate cells right?) are wut you would like the directory created to be named,right? Is/Will be the column title used in the directory name?
Are the cell formated with your desired directory path? Can all new folders be created within the same subdirectory?
If you need a bunch of different results from your data, It maybe easier for you to export the desired cells to a csv file and write a simple bat or Windows script to achieve your results. Otherwise you may need multiple macros.
Dunno, hard to say w/o knowing wut you are trying to end up with.
[Edited on October 14, 2008 at 10:42 PM. Reason : your're] 10/14/2008 10:41:42 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
the names are in separate cells and are what I want the directories to be named. column title will be used to name a higher directory.
example: A1: country B1: Rock A2: alan jackson B2: Def Leppard A3: alabama B3: Rolling Stones
one directory will be "country" and the two directories within that one are from cells a2 and a3. same goes for column b. (if that messes stuff up, then I can drop the column deal, and just make directories from cells below the column title
the cells just have names (text), as above.
all new folders in same directory 10/14/2008 10:49:13 PM |
ncsu2002 Veteran 248 Posts user info edit post |
OK I got wut you are trying to do. instead of explaining VB to you try this:
Select your folder name cells minus column title, copy them to a new sheet. export this new sheet range as: Save as TEXT; select space delimited
Open this new text file in notepad and add mkdir space your exported data ie alan jackson alabama should be here already Save the file as filename.bat execute the bat file by double clicking, folders should be created in the same subfolder as the .bat file.
Repeat as required for other column cells. It's a pain in the ass this way but easier then teaching you VB.
Note: There is an upper limit to the amount of characters that will be accepted with STDIn. so you may need to edit the export file for each A,B,&C column to created all your folders.
You could also try find some freeware that will use a cvs file to create your folders.
I'm going to a bar now. 10/14/2008 11:12:20 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
awesome thanks, that's working, but I have one issue. the only way to save it as space delimited is to use a prn file, which is fine, but it retains the column formatting in notepad, in fact, any text format is doing that (it retains the data as a column)
I'll just open it in word, find & replace all the paragraph breaks, that should work.
Thanks for all of your help!
[Edited on October 15, 2008 at 7:52 AM. Reason : l.] 10/15/2008 7:37:44 AM |
SaabTurbo All American 25459 Posts user info edit post |
ABSOLUTELY AMAZING.
TWW ACTUALLY MADE ITSELF USEFUL. 10/15/2008 7:56:19 AM |
ScHpEnXeL Suspended 32613 Posts user info edit post |
i'm a little confused at how this happened 10/15/2008 7:58:18 AM |
sumfoo1 soup du hier 41043 Posts user info edit post |
Mad props to ncsu2002 twwer of the day 10/15/2008 8:06:16 AM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
cause I got l33t skills, son. 10/15/2008 8:06:52 AM |
SaabTurbo All American 25459 Posts user info edit post |
GOT DAT OLD SCHOOL VAG SON? 10/15/2008 8:15:32 AM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
got dat new school vag, son. 10/15/2008 8:16:09 AM |
SaabTurbo All American 25459 Posts user info edit post |
OLD SKOOL VAG? 10/15/2008 8:16:39 AM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
ok, I got that script to work. next question..
would it be possible (and how/what is) to write a script to go through the folders and add spaces between words.
example: RollingStones --> Rolling Stones
all names are formatted with a capital letter where the space should be placed (except for single names, obviously)
[Edited on October 15, 2008 at 9:41 PM. Reason : ,] 10/15/2008 9:14:06 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
in excel, when using the transpose function for transposing text, is there a way to get blank cells not chow up as 0's after transposing? 10/15/2008 9:44:19 PM |
ncsu2002 Veteran 248 Posts user info edit post |
Hummm..... I can write a function for you to do this, it'll be sorta complex, but fairly straight forward, it'll need to make use of case, which is easy to do. The difficult part would be how to explain it to you, and how to implement it as well as how to create the macro if you are unfamiliar with vb studio in excel. esp using this msg board as a medium.
If what I gave you before works for single word names, a partial work around if it helps would be to format any cells that have a space like "alan jackson". If you quote a field mkdir will create the directory as the literal text within the quote,after you export the file.
I leave for Kentucky tomorrow, I'll see if I can write a complied function/Macro to do this during my flight. I think I can give you a binary, if you double click it should become an excel macro. I know for a fact excel 2007 in default setup has a lot of security restrictions, esp for macros. You may need to change these setting b/c my macro will be unsigned.
Not sure about Transpose function, first guess for transpose w/o looking into it would be to try " " or "alt255" (type " then hold down alt key while typing 255 then type ") alt255 in this case is not a literal/text statement.
sumfoo1 ----> thank you sir for the props!!!!!
[Edited on October 16, 2008 at 12:39 AM. Reason : for == to] 10/16/2008 12:37:32 AM |
themodernage Suspended 1339 Posts user info edit post |
I TOO HAVE A COMPUTER WITH SOFTWARE. 10/16/2008 12:39:45 AM |
ncsu2002 Veteran 248 Posts user info edit post |
I too have had sex...
[Edited on October 16, 2008 at 12:41 AM. Reason : too== to... too=also... ] 10/16/2008 12:41:04 AM |
ncsu2002 Veteran 248 Posts user info edit post |
You may be able to use Transpose with a nested call to UPPER. This page has a little primer on nesting formulas in excel
http://www.ozgrid.com/Excel/TextFormulas.htm
See if you can Google transpose and upper to solve this. I'm about to crash, got an early flight out...
[Edited on October 16, 2008 at 1:00 AM. Reason : functions == formulas] 10/16/2008 12:57:49 AM |
OhBoyeee Suspended 2164 Posts user info edit post |
fucking nerds 10/21/2008 10:40:02 AM |
Ragged All American 23473 Posts user info edit post |
OhBoyeee 10/21/2008 10:44:15 AM |