Incrementing named cells

Merry Christmas everyone!!!

Was wondering if any of you can help me with this. I have 
a financial model that currently has numerous named cells 
in the format of XXX_03 ( the 03 is to denote 2003 ) but I 
am making 2004 projection and therefore am wondering if 
there was an easy way to sort of copy and paste the names 
into a new column and automically renaming cells by an 
increment of 1 to XXX_04. If anyone can help, it will be 
greatly appreciated!

Thank you

Justin 
0
12/22/2003 9:28:26 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
553 Views

Similar Articles

[PageSpeed] 28

See one answer 1 minute later

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"Justin" <jsim_hba2003@hotmail.com> wrote in message
news:01cd01c3c8d2$89370e80$a501280a@phx.gbl...
> Merry Christmas everyone!!!
>
> Was wondering if any of you can help me with this. I have
> a financial model that currently has numerous named cells
> in the format of XXX_03 ( the 03 is to denote 2003 ) but I
> am making 2004 projection and therefore am wondering if
> there was an easy way to sort of copy and paste the names
> into a new column and automically renaming cells by an
> increment of 1 to XXX_04. If anyone can help, it will be
> greatly appreciated!
>
> Thank you
>
> Justin


0
Don
12/22/2003 10:37:12 PM
Justin,

How about something like

Sub ConvertNames(yr As Long)
Dim nme As Name

    For Each nme In ActiveWorkbook.Names
        If Right(nme.Name, 3) = "_" & Right(CStr(yr), 2) Then
            ActiveWorkbook.Names.Add Name:=Left(nme.Name, Len(nme.Name) - 2)
& Right(CStr(yr + 1), 2), _
                                     RefersTo:=nme.RefersTo
            nme.Delete
        End If
    Next nme

End Sub


Call with
    ConvertNames(2003)

or

    ConvertNames(Year(Date))

-- 

HTH

Bob Phillips
    ... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Justin" <jsim_hba2003@hotmail.com> wrote in message
news:01cd01c3c8d2$89370e80$a501280a@phx.gbl...
> Merry Christmas everyone!!!
>
> Was wondering if any of you can help me with this. I have
> a financial model that currently has numerous named cells
> in the format of XXX_03 ( the 03 is to denote 2003 ) but I
> am making 2004 projection and therefore am wondering if
> there was an easy way to sort of copy and paste the names
> into a new column and automically renaming cells by an
> increment of 1 to XXX_04. If anyone can help, it will be
> greatly appreciated!
>
> Thank you
>
> Justin


0
bob.phillips1 (6510)
12/22/2003 10:53:43 PM
Reply:

Similar Artilces:

Referencing merged cells
I'm having trouble referencing a merged cell in another workbook. Say I merge cells A1 to C1 in workbook 1. When I make this the active cell, the Name Box says "A1". When I go to another workbook (say, workbook 2), go to cell B1, type "=" and then go to the merged cell and select it, I get 'workbook1'!$A$1:$C$1 as the formula and, of course, the "#VALUE" error. I've successfully tried typing "=sum(" without the quotes hen clicking on the contents of the cell and then adding the ")" and it works O.K. but there should be an easi...

Axis label that corresponds to cell
I have an interactive graph which graphs data from a set column. This column changes depending on what is selected on a list selector. I was wondering if there is a way to label the y axis whatever was in, say cell AD11. I was hoping that that this would be something easy that I could write into the excel chart wizard, like =$AD$11, but it is not. Any help would be appreciated. -- pete3589 ------------------------------------------------------------------------ pete3589's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28402 View this thread: http://www.exce...

Finding the currently selected cell in another worksheet
Hi, In Excel 2002 I want to display the current row of worksheet A in worksheet B (in another format). Does anyone know how to do this? Ideal would be if this updates automatically, but performance wise I guess a macro activated by a button in worksheet A would be the best solution. TBH, Jeroen Jeroen, I don't know of a way in a formula to determine the active cell of the worksheet. Worksheets other than the active one don't have an active cell. I think macros are the only way. Put this in a regular module: Public Roww As Long Put this in the sheet A module: Private Sub W...

Auto fill cells with dates, exclude weekends?
What I'm doing is filling in multiple cells with dates (by dragging and filling) automatically. I was wondering if there was anyway for it to skip the weekends within the dates? Thanks in advance. Hi Sam rather than dragging with the left mouse button down, drag with the right .... when you let go you'll see an option for fill weekdays. Cheers JulieD "Sam Weber" <sam@hostradius.com> wrote in message news:af3901c4796d$85dff660$a501280a@phx.gbl... > What I'm doing is filling in multiple cells with dates > (by dragging and filling) automatically. I was wo...

Easy formula question -sum of 1 cell to end
Thanks for looking . How do you format a formula to display the sum of, let's say A1 to "however far down the spreadsheet goes" without having to name an ending cell? This sheet has no end and I need to display the total in a column that keeps growing. I hope I phrased this correctly. Hi Edward You could do it this way =SUM(A:A), that will cover the full column. HTH John "Edward" <222@333.com> wrote in message news:erIdCRRkJHA.1288@TK2MSFTNGP02.phx.gbl... > Thanks for looking . > How do you format a formula to display the sum of, let's say ...

matching full name to 'two column' name using sumproduct
Assume your names in Sheet1 are in column A, the dates are in column D, and the values you want to add are in column F. Further assume that the target_name in this_sheet is in A2. Try this formula in a cell in this_sheet: =SUMPRODUCT(--(Sheet1!A2:A100=A2),--(MONTH(Sheet1!D2:D100)=4),Sheet1! F2:F100) This formulae works very well (thanks to Pete for his help), however I need to use the same formulae to match the name in A2 to a spreadsheet that has the name to be matched to in two columns (first name (col A), last name (Col B). I currently use the following to match names i...

working with named lists
Hey guys, Im currently working with named lists and through vba i need to go and find on what row the list starts can Someone help me out ? Greatly apreciated Alexandre Named Ranges? msgbox worksheets("sheet1").range("Mynamehere").address 'or .row If you work with names, do yourself a favor and get a copy of Jan Karel Pieterse's (with Charles Williams and Matthew Henson) Name Manager: You can find it at: NameManager.Zip from http://www.oaltd.co.uk/mvp "Alexandre (www.pointnetsolutions.com)" wrote: > > Hey guys, > > Im currently wor...

How do I ignore blank cells while averaging the solutions of equat
I'm trying to average (items produced/manhours/workers) over the course of a week. The problem is each job isnt worked every day, so I have blank cells in my equation. Here is what I'm typing: =AVERAGE((B4/C4/D4),(E4/F4/G4),(H4/I4/J4),(K4/L4/M4),(N4/O4/P4)). I know there is a way to ignore #DIV/0 results, but I'm fairly new to Excel. I'm also trying to keep this all in one row to save space. Any help will be appreciated. -Ryan take a look at the subtotal function and see if it meets your needs. -- Gary Keramidas Excel 2003 "Kis...

dynamic cells
Hi! I wonder if somebody could help me with the following problem: I have two columns with cells containing some values B1..B22, C1..C22 everyday I add a new cell e.g. B23 and C23, B24 and C24,... I wonder if I use these cells in a forumla like REGR how to write in order to avoid updating the formula every day? REGR(B1:B22;C1:C22) TIA Anders. Anders, You could create a dynamic named range for each of your ranges. In your example, if you have no data below your list you could: Insert->Name->Define Input the name then in 'Refers To' type =offset (B1,0,0,counta(B:B),1) ...

Query to show empty cells
I am doing a database for addresses and would like to run a query showing the addresses that are empty. What should I put in the criteria to show an empty cell? Try out the query with IsNull as criterion. -- ********* http://panjas.org If the message was helpful to you, click Yes next to Was this post helpful to you? If the post answers your question, click Yes next to Did this post answer the question? "xololady" wrote: > I am doing a database for addresses and would like to run a query showing the > addresses that are empty. What should I put in the criteria to sh...

How do I add the same text to numerous existing cells
How do I add the same text to numerous existing cells without having to repeatedly type the text? Ex. adding .gif to XXE1149J, XXE1130J... =A1&".gif" "Wanda_pb" <Wanda_pb@discussions.microsoft.com> wrote in message news:6D20A2D9-3BFF-4BA2-A85D-7F5FD229A62A@microsoft.com... > How do I add the same text to numerous existing cells without having to > repeatedly type the text? Ex. adding .gif to XXE1149J, XXE1130J... Thank you, that was very helpful, but I guess I should have mentioned there were "/" also in the text. When I did your sugge...

Combining date and time into one cell
I have the date (m/dd/yy) in one cell and time (hh:mm) in another cell. How can I merge these two in one cell with the format m/dd/yy hh:mm ? Thanks. Date in A1, time in B1, combined in C1: formula is =A1+B1 and format as you describe. On Sat, 22 Jan 2005 14:03:02 -0800, "Kelly C" <KellyC@discussions.microsoft.com> wrote: >I have the date (m/dd/yy) in one cell and time (hh:mm) in another cell. How >can I merge these two in one cell with the format m/dd/yy hh:mm ? > >Thanks. =TEXT(A1,"m/dd/yy ")&TEXT(B1,"hh:mm") is one way -- HT...

When you click a hyperlink in a cell i get a Warning message
This message is about harmfull files and gives you an OK and CANCEL. Is it at all possable to disable this particualr message because i have a document full of hyperlinks and its getting anoying!!!! Thanks. ...

excel's active cell
how to highlight the active cell with a color each time it moves angelaexceluser, have a look at Chip's addin here for one way to do it, http://www.cpearson.com/excel/RowLiner.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "angelaexceluser" <angelaexceluser@discussions.microsoft.com> wrote in message news:48BB20C8-3DF8-43AB-B913-9CDB2A288748@microsoft.com... > how to highlight the active cell with a color ...

Excel VBA
Hi. Is it possible to use VBA in one workbook to copy a worksheet fro another workbook into another different workbook? If so....how? Thank -- Message posted from http://www.ExcelForum.com Hi try recoding a macro while doing this manually. And yes it is possible :-) -- Regards Frank Kabel Frankfurt, Germany "cjh1984 >" <<cjh1984.16x63k@excelforum-nospam.com> schrieb im Newsbeitrag news:cjh1984.16x63k@excelforum-nospam.com... > Hi. > > Is it possible to use VBA in one workbook to copy a worksheet from > another workbook into another different workbook? ...

Changing formula in multiple cells or range simultaneously
I am trying to change the value in multiple cells in a large worksheet simultaneuously. I want to identify the range and then adjust the formula in the entire range. Is there a way that I can highlight the range and then change to formula in each, simultaneously? For example, if I wanted to double the value in the entire range, how would I do this? Thanks, Michael You could put 2 in an empty cell. Copy it Edit|Paste special|click on Multiply under the operation section. Then clear out that 2. But it really depends on what kind of change you're making. If you wanted to ad...

Outlook 2000 display name
Trying to change the display name of an account in Outlook 2000 SP-3 Windows XP machine But I can't find the option to do it, all I keep on getting is e-mail services and nothing that says accounts even when I go through options. Any help would be appreciated Corp/Workgroup mode does not use the term account. Your Internet Mail Service is your email account. Set the name there in Properties -- Russ Valentine [MVP-Outlook] "Miranda" <anonymous@discussions.microsoft.com> wrote in message news:0c2a01c46e89$a46fc5e0$a601280a@phx.gbl... > Trying to change the display n...

Copying one cell to muliple cells #2
Cell a1 is a date cell. Cells b1-b30 are date cells. What I am trying to do is every time that I enter a new date in Ai, I want it to go to a blank cell in b column and not over write the dates that are already there. A B 2/3/04 1/6/04 1/20/04 1/25/04 2/3/04 right click sheet tab>view code>copy\paste this>format col B as desired date >save. Now when you put a date in a1 such as 8/1, the last cell+1 in col b will get that date. Private Sub Worksheet_...

The sheet path file name ?
Hi all , How can i edit in a cell a formula to retrieve the whole path of th sheet and not only the file ! Thank you veru much -- gaftali ----------------------------------------------------------------------- gaftalik's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=645 View this thread: http://www.excelforum.com/showthread.php?threadid=48453 If you can use a UDF in your workbook then you could use one like so Function FullPath() As String Application.Volatile True FullPath = ThisWorkbook.FullName End Function -- HTH Nick Hodge Microsoft MVP - Excel Sout...

changing report headings names
I would like to give the user the option of changing the report heading names, I can do this with the Docmd.openreport, stdocname, acviewdesign,,,achidden and then grab the current heading and display that heading and allow the user to change it. I then do a docmd.close acreport, stdocname, acSaveYes, this works just fine when I test but when I compile the program into a mde it doesn't like the it. Is there another way of doing this? Thanks for any help. Tom you can write the current heading names to a table, making sure the table holds only one record. add the table to the quer...

Long Description? Manufacturer name? Images?
Hi, We ahve GP 8.0 and want to add an additional long description to items (short paragraph). Is there a field the either is created for this or could be used for this purpose? Same thing with Manufacturer. We want to be able to store this information in it's own field attached to the item. And anywhere for images? Thanks, Jason ------=_NextPart_0001_8B600AF1 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Jason, This is Angela; I'd be happy to help you with your question today. Thank you for using newsgroups. It looks like you want to add a long description (...

Outlook email attachments displaying in name order?
When opening an email with multiple Word document attachments is there a way to display the attachments in name order? Your help would be greatly appreciated. Annabel Hurdman <A.Hurdman@btinternet.com> wrote: > When opening an email with multiple Word document attachments is > there a way to display the attachments in name order? > > Your help would be greatly appreciated. They should display in the order the sender attached them. -- Brian Tillman No they don't. I attach them in name order from Word. The client then opens the email and they are not in the same...

Display names in Global address book do not update
I made a change to one of my users so that their display name shows as last name, first name. This change has not been applied to the global address book, but you can see the change has been made in active directory users and computers. Any idea how I update this change for the global address book? Thanks, Mike YOu need to wait for the global catalogs to refresh.....depends on your AD topology. "Mike Fefferman" <mike@nowhere.com> wrote in message news:%23v%23sxI5PFHA.3156@TK2MSFTNGP15.phx.gbl... >I made a change to one of my users so that their display name show...

Cell Formatting to disp. ### numbers
I am trying to format the cells so that it only allows three numbers t be displayed. To be more descriptive: We work with zip codes quite often, but, we only use the first thre digits. Someone sent us a xls file with 12000 zip codes, in one column, and need to know how to make the column show only the first three digits o all the zip codes.. there is another problem, when I convert them to a numeric value, i removes the zero in front...ex. 08245, becomes 8245, but i need to kee that zero in front. Thanks -Eri -- Message posted from http://www.ExcelForum.com Assuming your zip codes a...

How do I insert a row of blank cells?
I need to know how to insert a row of blank cells every other row in the columns from F to I ONLY!!! I currently have just a straight set of data in those columns like data-data-data-data-data-data. I need to have it alternate data-blankrow-data-blankrow-data-blankrow- as I go down from row to row. I need to do this for about 1000 rows so I need a quick way to do it if there is one. HELP!!! Looks like this: Data Data Data Data I want this: Data Data Data Data Thanks. Chris -open the VB editor -double click the sheet of interest -View from the menu--> Code -Paste the belo...