|
-
Nov 12th, 2014, 01:28 PM
#1
Thread Starter
Lively Member
Excel VBA: Creating an auto file namer
This one should be fun. I've been tinkering with this but can't figure it out, my skills are just too basic even though I know this can be accomplished with if/then statements but I'm interested in seeing who can do this more efficiently.
What I need is a VBA code that will search for the contents of a few cells and report back with a file name based on a few parameters per cell.
Example:
2 cells will be referenced, each can have 1 of two types of information (just for the sake of this exercise); if cell A2 says "Yes" then I need the VBA code to use "6000", if it says "No" then I need the VBA code to use "5000".
Then, if cell A3 says "Up" then I need the VBA code to use "Aloha", if "Down" then use "Mahalo".
I need the code to concatenate the two results with a hyphen in between the two results: like this --> 6000-Aloha or 6000-Mahalo or 5000-Aloha or 5000-Mahalo.
Another quick question, would it be possible for the VBA to not place the results in a sheet but rather perform the concatenation and place the answer in cell A10?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|