Arrangement head of the table in the macro code

jpol

New Member
Joined
Oct 22, 2012
Messages
21
I must change a head in the original table.
I have some trouble with doing an adjustment in code

I've attached original file (macro it's ok)
Download do wyslania 5 zmienne z ogr f.xls from Sendspace.com - send big files the easy way
and the second what I need
Download do wyslania 5 zmienne head.xls from Sendspace.com - send big files the easy way

And another question what do I need to do to change worksheets names for example "2010" into "year 2010"
I suppose I must doing something with this
Code:
<code>[COLOR=#606]If[/COLOR][COLOR=#606]IsNumeric[/COLOR][COLOR=#660]([/COLOR][COLOR=#606]Wks[/COLOR][COLOR=#660].[/COLOR][COLOR=#606]Name[/COLOR][COLOR=#660])[/COLOR][COLOR=#606]Then[/COLOR]</code>

Thank u for help
Regards
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
jpol,

And another question what do I need to do to change worksheets names for example "2010" into "year 2010"
I suppose I must doing something with this
Code:

<code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-style: inherit; font-weight: inherit; font-family: monospace; line-height: 12px; ">IfIsNumeric(Wks.Name)Then</code></pre><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-style: inherit; font-weight: inherit; font-family: monospace; line-height: 12px; ">
</code>

Re your second question.

Yes, if you have sheet tabs that are numeric eg 2010 then code such as below will run through all sheets and add "Year "

Code:
Sub ReName ()
For Each sht in ThisWorkbook.Sheets
If IsNumeric (sht.Name) Then sht.Name = "Year " & sht.Name
Next sht

End Sub

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,207,199
Messages
6,077,021
Members
446,251
Latest member
dpf220

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top