Save As using contents of Cell in Name

Can someone help with code that changes the "save As" file name to 
combination of the original File Name + the contents of a cell, an
saves file in same folder as the original.

E.G. Original File Name= Timesheet
Cells B1= Location
Cell C1 = Date in format 3-5-2004
Cell A1 = concatenate(B1,C1)

Fle Name will therefore  be "Timesheet Location 3-5-2004"

The other problem is with the date. When concatenating, how do I forma
the date to avoid it looking like "Location 38051"

Any help much appreciated

Nic

--
Message posted from http://www.ExcelForum.com

0
6/15/2004 7:58:39 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
374 Views

Similar Articles

[PageSpeed] 50

Hi
for concatening use the formula
=B1 & " " & TEXT(C1,"M-D-YYYY")

for saving you may use a macro like
sub save_it()
dim rng as range
set rng = activeworkbook.worksheets("sheet1").range("A1")
activeworkbook.saveas rng.value
end sub


-- 
Regards
Frank Kabel
Frankfurt, Germany


> Can someone help with code that changes the "save As" file name to a
> combination of the original File Name + the contents of a cell, and
> saves file in same folder as the original.
> 
> E.G. Original File Name= Timesheet
> Cells B1= Location
> Cell C1 = Date in format 3-5-2004
> Cell A1 = concatenate(B1,C1)
> 
> Fle Name will therefore  be "Timesheet Location 3-5-2004"
> 
> The other problem is with the date. When concatenating, how do I
> format the date to avoid it looking like "Location 38051"
> 
> Any help much appreciated
> 
> Nick
> 
> 
> ---
> Message posted from http://www.ExcelForum.com/
0
frank.kabel (11126)
6/15/2004 6:14:15 PM
Reply:

Similar Artilces:

APPLY A CELL's FORMAT WITHOUT SELECTING
Any idea how to have a cell(s) for example A1:A10 acquire the exact format as of B1 without copy, selecting & pasting special xlPasteFormats? -- Thanx in advance, Best Regards, Faraz This macro will do that... Sub CopyB1sFormat() Dim V As Variant, Ra As Range, Rb As Range Set Ra = Range("A1:A10") Set Rb = Range("B1") V = Join(WorksheetFunction.Transpose(Ra.Value), Chr$(1)) Rb.Copy Ra Ra = WorksheetFunction.Transpose(Split(V, Chr$(1))) End Sub -- Rick (MVP - Excel) "Faraz A. Qureshi" <FarazAQureshi@discussions.micro...

How can I stop cells recalculating after macro run
Hi folks I have a macro which when run removes a couple of excess lines from a report (produced from elsewhere). The excess lines appear depending on what time of the day the report runs. When I run the macro, the links on the second sheet are recalculating, changing to the formula to an incorrect cell. I have tried the following to get around this issue, without luck:- All formulas in the linked sheet have been made absolute references using the $ for all cell references; Within the macro, made the calculation method Manual then reverting to Automatic at the end of the macro. The basic qu...

Report name 10-02-07
I'm not really sure if this should be here or in another area, so forgive me if it should be elsewhere. This is a bit complicated so this may be a long post. I have a report that is driven by a query. The query is based on a dynamic table and pulls mailing list data. The underlying table contains contact information for businesses, staff members, volunteers, clients, etc. Any given person in the table could be in any one or more of those categories. Each category has a checkbox and if the person is in that category, the box is checked. There is a form on which each of the cat...

Countif in two columns and in different cells
I'm not sure which function I need to add text "p" and "cps" when this data is in different columns. The total in this ex: would be p+cps = 2. Any help would be greatly appreciated. I'm new at this. shift class p cps p x p x p x p cps total p+cps = 2 "ferde" wrote: > I'm not sure which function I need to add text "p" and "cps" when this > data is in different columns. The total in this ex: would be p+cps = 2. > Any help would be gre...

Range
what am i doing wrong dim myRange as Range dim iNum as integer iNum= 6 Set myRange = Cells(iNum + 2, 1) myRange.Value = 34 trying to set a cell myRange to cell(8,1) then putting the value 34 into the cell see other post -- Don Guillett SalesAid Software donaldb@281.com "cantonarv" <arvindev@gmail.com> wrote in message news:1132664392.929298.239350@o13g2000cwo.googlegroups.com... > what am i doing wrong > > dim myRange as Range > dim iNum as integer > iNum= 6 > > Set myRange = Cells(iNum + 2, 1) > myRange.Value = 34 > > trying to set a cell ...

Using Doxygen's \callergraph command ???
So far I can only get Doxygen to generate callergraphs for ALL functions or for NO functions, Doxygen seems to be ignoring the \callergraph command. Does anyone know how to limit Doxygen to producing complete callergraphs (the entire function call sequence that ends up at a specific function) for a limited number of functions? PeteOlcott wrote: > So far I can only get Doxygen to generate callergraphs for ALL > functions or for NO functions, Doxygen seems to be ignoring the > \callergraph command. Does anyone know how to limit Doxygen to > producing complete callergraphs (the entir...

Help with query using multiple variables
Current query fields: Account, SumPrincPmts, Transactions, PostDate I am needing to run a query from a form (form name: frmbuyout) that places the results in a report (Test). I need this query to Filter my results by date and where the Principal pmts (are listed in table as a LTD Sum) are less than the Total Transactions by account(currently in the table the transactions are listed individually and not a sum of). With the code below I can filter the information by date but I am having trouble finding a way to also filter by pmts value being less than the sum of the total transactions (this wi...

NULL cell value = 0 ?? --for VBA
Select Case Cells(2 , 7) Case 0 zwch = 5 Case "" zwch = 5 Case 1 To 1999 End Select My question: cell(2,7) is NULL ( nothing in it ) , should I write program as -- case "" ? I tested this, found that even without this sentence ( case ""), the programe runs well and the programme look on NULL cell as 0 What's your opionion ? VBA will try to cast the result of Cells(2, 7) (which defaults to Cells(2, 7).Value) as the same type as the Case argument. So an empty cell evaluated as a string is cast to a null string &...

Populate a form based on a query using parameters
I have created a form that is populated from a query. I have a text box set up as an input box and click a button (Search) to execute the search. This appears to be working fine as the query opens and runs. However, it displays in the query in data format instead of in the Form I created. How do I get this information to populate the form, not the actual query. The Search button is set to RunQuery. On Apr 19, 7:07=A0pm, Mommybear <Mommyb...@discussions.microsoft.com> wrote: > I have created a form that is populated from a query. =A0I have a text bo= x set > up ...

Names in Calendar
I have just moved over to Outlook 2000 and cannot find any way to sort my Calendar by Last name,First name. Calendar appears to be using the Display name from the Contact and I do not see any way to modify this. Thanks David "David Vincent-Jones" <avidvj@verizon.net> wrote in message news:%23FdlRei7FHA.3648@tk2msftngp13.phx.gbl... >I have just moved over to Outlook 2000 and cannot find any way to sort my >Calendar by Last name,First name. > > Calendar appears to be using the Display name from the Contact and I do > not see any way to modify this. >...

MS Query and Row Range Names
We utilize MS queries in a spreadsheet that has range names for rows. Unfortunately, when the query returns a different # of records than before the query, it messes up the reference of the range names (i.e. if row 123 is named "Partner1" before the refresh of the query, "Partner1" will not move with the associated row if new records are inserted and/or deleted - NOR does it stay at row 123). Does anybody know what is going on and how to overcome this issue? Thank you. Correction to my original message, the range name does stay at row 123 (i.e. absolute). But I h...

NDR
Hi, Occasionally, and now with increasing frequency we are getting internal messages NDR'd with... The message contains a The MTS-ID of the original message is: c=GB;a= ;p=ORG Servic;l=Server Name-031217155014Z-57647 Event ID 290 is written to the app log. Does anyone know how to correct/troubleshoot this intermittent problem? I've had a good look through Technet without any joy. The servers are NT4 SP6a and Windows 2000 SP3 with Exchange 5.5 SP4. Sites are connected with X400 connectors. The configurations of the connectors have not been changed for months. Thanks, jame...

I forgot the password I used for a Word Document.
Is there a way to retrieve a password used in a MS Word document? Kathy wrote: > Is there a way to retrieve a password used in a MS Word document? If you mean a password needed to open or edit the document, the answer is "probably not". If it's a password for forms protection, that can be removed easily. See http://www.gmayor.com/Remove_Password.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. ...

being new to computors how do i save a email address
how do i save a email address that has been sent to me? Right click on it in the header and choose "Add to Contacts" "thisis becomingtoadvanedforme" <thisis becomingtoadvanedforme@discussions.microsoft.com> wrote in message news:8C0C07EF-7147-470D-80DD-46E351FC8427@microsoft.com... > how do i save a email address that has been sent to me? ...

Excel formula to find position of the contents of a cell within a column.
Hi, can anyone help with the following problem. I'm trying to find out the position of the contents of a cell within a column. I know that the value in cell B103 appears 4 times in column B from a COUNTIF function; however, I need to know if the value in B103 is the first, second, third or fourth time this value has appeared. Is there an easy way to do this using formula? I need to set a calculation and the number of OFFSETs required will depend on whther the value in B103 is the 1st, 2nd etc. Any help would be appreciated. Thanks. Alasdair. you could try conditional formatting with a th...

How do I get Excel to automatically enter the contents of a cell .
Can you provide some more detail on exactly what it is you're trying to achieve? The phrase "automatically enter the contents of a cell" can be interpreted a 1000 different ways in Excel. Thanks HTH Jason Atlanta, GA >-----Original Message----- > >. > ...

Can't use ITune songs in Powerpoint presentation
ITunes Store downloads songs as MPEG 4 which Powerpoint 2007 doesn't recognize on my PC with Windows Vista. When converted to .mp3 and inserted, there is no sound in Powerpoint. I've used dBpoweramp to convert to WAV, but still no sound on Powerpoint. All versions play on the computer with ITunes or Windows Media player. Any suggestions how to get these songs into Powerpoint? Thanks. Hi I'm afraid the file may have DRM protection, in which case it won't work in PowerPoint. Lucy -- Lucy Thomson PowerPoint MVP MOS Master Instructor www.aneasiertomorrow...

Problem setting Property Sheet values for a Form using VBA
Hello, I have a problem with setting Property Sheet values for a Form using VBA code. I am trying to set the following properties: ..RecordSource ..InputParameters ..UniqueTable I am setting this in an ADP and for a couple of my users my code works without any problem, and for other users it errors because it cannot set the properties in the form. My code which works: With Me.sfrmppepCGL_1_HeadsOfCover.Form .RecordSource = "dbo.procHeadsOfCoverByPolicyLineIDTypeGet" .InputParameters = "@lngPolicyLineID int =" & Nz(Me.txtPolicyLineID, 0) & &q...

Auto recover save problems
I have been getting dialog pop-ups saying that Word (or Excel) is unable to auto save (which I've set to every 10 minutes). Excel disables it for the session, Word pops-up the dialog box every 10 minutes (until I disable it). The file I'm working on is on another volume, but I don't think it's a permission error 'cuz I can save normally. ...

Changing the text within a function based on a cell reference.
I have multiple defined ranges that I called "List1", "List2".......... all the way to "List61". I could manually input the new lists names into the function everytime I fill down but this is a tedious job. I was wondering if there was a way to have a the function call a seperate cell to get the number and append it onto the defined range? This way when I do fill down the List name automatically changes with the contents of the referenced cell. Is this possible? Here is the function I am using.... {=SUM(IF(FREQUENCY(IF(LEN(List1)>0,MATCH(List1,List1,0),&qu...

Saving Location "Tempory Internet Files" Problem
Hello, While working on a Windows XP Pro SP2 machine using Microsoft Windows Outlook 2003, I have an issue. If I open an attched Document that came in an email and I decide to save this Document, by default, it saves to a "Tempory Internet Files\OLKFC" Folder. Is there a way we can change this to always point to a Network Drive mapping... My users sometimes forgets to look where they are saving this file and automatically save it to this folder which is later deleted... Thanks in advance Michael I don't think you can change that. It's a security thing if I remem...

Cell Capacity
Hi, I hope you are having a great day. I exported a query/report from Access 2000 into Excel. Everything looked okay until I examined it further and found the data in one of the cells was truncated. I tried everything I could think of to get the info, but nothing worked. Without counting the characters, it appears the truncate position is the same in all cells. Does anyone have a solution for this other than retyping the truncated data into Excel. Thanks in advance. KP KP Look in Help under Specifications. Excel can hold some 30,000+ characters in one cell but it will display o...

How do I delete Outlook Today Folder when using Exchange Mailboxes
I recently moved to Windows Server 2003 and Exchange 2003 with all latest updates on a new machine then migrated my exchange accounts over (very nasty thing to do). When setting up a migrated account using Outlook 2002 and exchange as the mail type it shows 2 main folders in the folder list. Mailbox- Doe, John and then it shows Outlook Today -[Personal]. While all mail bounces from the Mailbox -JD to the Outlood Today -[Personal] all previous contacts, emails, groups, etc. stay in the Mailbox -Doe,John. I want to get rid of the Outlook Today folder. Any Ideas? I do have screen shots i...

select all non-blank cells
I need a macro to select and copy all non-blank cells in Sheet1, then paste these cells into sheet2 at Cell A1. thanks much! Try the below Sub Macro() Sheets("Sheet1").UsedRange.Copy Sheets("Sheet2").Range("A1") End Sub 'If you have any formulas that are to be converted to values then try this version Sub Macro() Sheets("Sheet1").UsedRange.Copy Sheets("Sheet2").Range("A1") Sheets("Sheet2").UsedRange = Sheets("Sheet2").UsedRange.Value End Sub -- Jacob (MVP - Excel) "johncaleb&...

How do I get absolute values for a range of cells?
I various spreadsheets with a mixture of positive and negative numbers. I would like to make them absolute values. I believe a macro would be necessary. Hi Terry i've just tried this on a SMALL data set - so you might like to test it a bit more thoroughly before believing in it ... but i selected the range i wanted to convert to positive values and did edit / replace find what: - replace with: <<leave blank>> clicked Replace All seemed to work. Cheers julieD "Terry" <Terry@discussions.microsoft.com> wrote in message news:6F41A1F8-1E8C-4643-92B4-8CD...