Sheet Name In Cell Not Working
May 3, 2014
take a look at sample worksheet, and click on the button "months". It will generate moths, and It should also insert sheets name in B13 cell. That is also good, but It should enter all names in upper case to that cell, in each sheet - but It doesn't. WHY ??
View 6 Replies
ADVERTISEMENT
Jul 29, 2006
I am trying to do a basic time sheet for a friend and i know NOTHING about VBa so dont use it..
I simply want to work out how many hours someone works and was going along nicely until someone work over 12 hours.
I have
Start time end time hours worked
I formatted the boxes for hh:mm and the formula was end -start (easy)
then someone started at 8am and worked right throught to 5:30am and i get the answer as -2:30 but it should be 21:30
View 9 Replies
View Related
Jun 9, 2014
I'm currently using a vba script to unprotect all of my worksheets within my workbook in order to refresh the pivots and then protect them again once the pivots are completed, but there are two worksheets I would like to remain unprotected in order for users to be able to edit them after the pivots have been refreshed. Now I've tried adding a sub code in order to unprotect one of the sheets as a test to see if it will allow me to edit the worksheet after I update the pivots. Unfortunately the coding isn't working, and the worksheet is still remaining in protect mode. Here's the code I am using to protect the worksheets when refreshing the pivot as well as the code I am attempting to use in order to unprotect the one worksheet.
View 4 Replies
View Related
Nov 9, 2008
I have used the below code to make hide/unhide some columns in my excel sheet. It works fine. Now, I need to protrect the sheet except the coloured cells. So I unlocked the cell by clicking the property of the colored cells & then did this :- tools- protection-Protect sheet - protect unlocked cells. But after protecting this sheet the macro code of hiding/unhiding of the columns are NOT WORKING & Errors is coming. I have used the below code:-
View 4 Replies
View Related
Sep 19, 2013
I have certain cells which I want the formulas hidden to the end user and protected so they can't update them.
I've locked and hidden these cells and protected the sheet however my Macro's fail to work thereafter.
Protect the sheet for the user interface only. This has to be done in VBA:
- Activate the sheet.
- Activate the Visual Basic Editor (Alt+F11).
- Activate the Immediate window (Ctrl+G).
- Type
ActiveSheet.Unprotect
- Press Enter.
- Type
ActiveSheet.Protect UserInterfaceOnly:=True
- Press Enter.
The sheet is now protected for the end user, but VBA code can freely manipulate it.This works well however when I go to another page and do the same it stops working on the original sheet.I would like to know if there is an easy way to:
protect/unprotect all sheets in one go and have the macros still work?
When I protect pages individually I want the following to be allowed:
Select unlocked/locked cells
Format
Sort
Use autofilter
use pivottable
I will first save which cells are un/locked & hidden.
View 9 Replies
View Related
Jul 3, 2008
if anyone has some vba code that can help with keeping latest duplicates when pasting to another worksheet.
Basically, I have a worksheet with YTD data and another worksheet with data for the current month. I need to paste the data from the Month to the YTD sheet. However, if the data (a reference number in column A) already exists, the row from the Month data should be pasted over the duplicate in the YTD sheet, and if it doesn't exists, it should paste it as a new row.
At the moment I'm just copying the whole lot to the YTD sheet and then try to remove duplicates, however, once it's pasted, I don't know which ones to remove.....
View 9 Replies
View Related
Jun 1, 2009
I have a excel worksheet with hyperlink. If the sheet is protected I am unable to use the hyperlink even though I have unblocked the protected cells.
View 9 Replies
View Related
Feb 16, 2010
Got most of this code from the web and I can't get it to work. The part I added was the array and loop bit. As a test I specifically renamed one of the sheets in the file to be something NOT in the array, but it still goes through like it exists (I.e. shexist=True). What did I miss?
Dim wsname As String, shexist As Boolean
myarray = Array("Statement of Values", "Vehicle", "Driver Info.", "Revenues by Discipline", "Revenues Geographically", "Employee-Payroll Info. CDN & US", "U.S. Payroll", "Employee-Payroll Info. FOREIGN")
For i = 0 To WorksheetFunction.CountA(myarray) - 1
shexist = False
On Error Resume Next
wsname = myarray(i)
shexist = CBool(Len(ActiveWorkbook.Sheets.Item(wsname).Name))
On Error GoTo 0
If shexist = False Then
MsgBox "The worksheet '" & wsname & "' does not exist in this file or has been renamed." & _
vbCr & "Please check the file and try again.", vbExclamation, "Consolidate"
GoTo THEEND
End If
Next i
View 9 Replies
View Related
Jan 24, 2014
I have two sheets and need information from Sheet titled Add-Del_chng positions to be moved to the sheet titled Cost Distribution.The issues here are :
1. The values in Cells A through J should be moved only if col Z value is 'hard coded"
2. The values should be moved to the 13th row.
3. This should happen every time the value is input into col Z of sheet titled add_del_chng.
Currently the macro does not run unless I go into the code and press play. I need this to happen automatically.
View 13 Replies
View Related
Jan 22, 2008
I am working on Excel 2000. I am creating a protected worksheet which will have conditional formatting and validation on manual input cells (formatted to light yellow). I want to make sure that people do not accidently forget and paste data into those cells. I read up on solutions from this thread; [url] and most of it seems to be more complex than what I needed (and I couldn't get it to work)
I copied some code from this website post
[url] to my worksheet.
It works fine if the Validation criteria is set up simultaneously (i.e. it's all the same) but does not work if the columns have different validation criteria. How can I modify it to work under those conditions? I have included two workbooks, one in which the val critieria is identical (and it works) and one in which it varies between columns (and it doesn't work). I also noted that if I modify the one that doesn't work to make it homogenious, it still doesn't work unless I go back and highlight all and reformat that way.
View 14 Replies
View Related
May 28, 2009
I was working on some code that would create a new folder in My Documents and within that folder export the current worksheet and save it there with a particular name. After doing so I need it to return to the original worksheet and clear contents. I would also need to export to the new sheet only contents of the cells without any macros or buttons.
View 5 Replies
View Related
Jul 23, 2009
Me.Rows.Autofit with a Protected Sheet not working.
Basically I want to use vb code which is
View 2 Replies
View Related
Dec 20, 2012
When I either manually check the box for allowing sorting and autofiltering, or I do it through vba with:
Code:
With Sheets("Inventory")
.Protect Password:="###", AllowSorting:=True, AllowFiltering:=True, AllowUserInterface:=True
.EnableAutoFilter = True
End With
I still am unable to use the icons. The icons are clickable to filter or sort, but every time they say that the cells I am selecting are protected. I want them to be protected from editing the data, but want to allow them to be sorted or filtered.
View 1 Replies
View Related
Jan 9, 2007
I am trying to password protect some of the cells in a worksheet. However doing that starts giving errors with Macros. The Macros are no longer working and infact giving error. What can I do to stop that happening?
View 9 Replies
View Related
Jan 10, 2008
The sheet was working fine, then all of a sudden (i dont know what i have done) the up and down arrows (on my kayboard) wont work when the sheet is protected, when i unprotect the sheet they work fine, i can use left and right. i have checked the scroll lock isnt pressed/illuminated on my keyboard.
View 9 Replies
View Related
May 29, 2013
The problem I am having is in trying to make a custom cell format for inputting my data. I want it to appear as 44° 41' 5" (in the same cell). I would like the cell to function so that if im inputting data manually for it to automatically put in the appropriate (degree,minute or second marks). That way I could just enter somthing like 44 41 5 and it display properly. Also I am trying to keep the data in text format for another marco I am running to convert the DMS data into decimal.
View 2 Replies
View Related
Sep 10, 2013
I have a data set that is defined as a table (Ctrl + T). There are formulas so I locked those cells and Protected the sheet. If I am at the bottom right cell, and press Tab to add a new row, I get an error message: "Cannot use this table functionality on a protected sheet"
I really need to protect the cells with formulas so that the are not accidentally deleted. But I also want to retain the Table format.
Is there a way around this without using VBA?
View 1 Replies
View Related
Jun 2, 2014
I have an attendance sheet for our Company Employees.
This attendance sheet shows the salary of the month from the total basic salary / hour and overtime / hour of each
employee.
I found a problem in this sheet. When i reduced overtime charges in the last of this sheet so the Total Salary of the month
was not changing. I couldn't found any mistake in formulas.
View 1 Replies
View Related
Nov 23, 2008
per attached I'm trying to establish that values in one sheet are present in another. The MATCH function isn't returning anything.
View 5 Replies
View Related
Feb 12, 2010
Hello all. I have the following code that works for Outlook 2003 but does not work for Outlook 2007. Does anyone know what changes need to be made so this macro will work in both Outlook versions?
View 9 Replies
View Related
Mar 13, 2006
I have a sheet set up with names. I have 2 other sheets with spouses and
children that belong to the first sheet. I want to insert a formula that
will look up the correct spouse (based on a member number) and put in it the
column. Same with the children. I tried the vlookup function, but it did
not return the correct result.
View 14 Replies
View Related
Jul 22, 2013
This very simple color code below worked before but now it gives "Application-defined or object-defined error". When I try it on a new workbook, it works fine.
Code:
Sub sdsdfsd()
Selection.Interior.Color = 65535
End Sub
View 1 Replies
View Related
Jun 3, 2014
I'm fairly new to macros but somehow i managed to create all the required macros for my project through googling and the like. The problem is that i created my macro enabled excel file in XP and when i transferred it to Windows 7 the auto save to PDF macro stopped working with the Runtime Error '5' Invalid Procedure, call or Argument. The highlighted error is as follows.
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:="C:WindowsTemp emporaryexam.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
This auto save is supposed to work when a hyperlink is clicked or when the set time runs out (Working Macro).
View 5 Replies
View Related
Apr 27, 2007
I am using a BeforeDoubleClick event to look for a worksheet name and if it exists, go to the sheet. If the worksheet does not exist, it is creates a new sheet by copying a hidden sheet and naming it using a name in a cell reference. It works for the most part, but I am finding that it is having an intermittant issue. Sometimes, when I double-click, it double-clicks the target cell for editing, and then it renames the active sheet to the cell reference rather than copying the hidden sheet. It seems to happen when I reach 35 sheets created, but not always. Here is the
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim WSname As String
Dim WScheck As Worksheet
Dim WScheckname As String
If Not Intersect(Target, Range("A5:L85")) Is Nothing Then
WSname = Range("L" & Target.Row)
On Error Resume Next
Set WScheck = Sheets(WSname)
If WScheck Is Nothing Then 'Doesn't exist so create it
Sheets("Master_SLP").Copy Before:=Sheets(Worksheets.Count)
ActiveSheet.Name = WSname.........................
View 5 Replies
View Related
May 26, 2009
I have created a workbook ( with protected sheets) containing two macros " To Insert a Row ( Copying the formula from the row above) and "Delete a Row", both, assigned to a customized toolbar.
when I move the workbook, say from the folder where I created it originally to the desktop, the macros stop working giving error like THE MACRO " C:so n so... CAN NOT BE FOUND!
View 9 Replies
View Related
May 3, 2012
This first macro works fine:
Sub UnhideHBPorCholesterolQ1toQ3()
'
ActiveSheet.Unprotect "password"
Rows("58:67").Select
[Code]....
why the second macro does not seem to work. I get a Run-time error that says "Unable to set the Hidden property of the Range Class".
View 1 Replies
View Related
Jul 2, 2014
I have a form that loads and depending on the word selected in the drop down the following code loops through cells Q2:AC2 until it finds the word in one of those cells (the word will always be in one of the cells)
Code:
For Each c In Range("Q2:AC2").Cells
If c = period Then
c.Select
[Code]...
The active cell it finds will always change, i know I need something to code the active cell back but I don't know what it should be.
View 5 Replies
View Related
Jan 27, 2014
I am trying to write a sub for using vlookup. To enable the vlookup, I want to return a word in a cell to the cell in the next column. I use the InStr function, but it doesn't work. They all return as "Other".
Attached is the worksheet and here are the codes : Capture.JPG
[Code] .....
View 11 Replies
View Related
Jan 25, 2010
I have a workbook in excel 2003 which I had been running the following macros (listed below). We recently upgraded to Excel 07, and neither are working. When I try to run them, the "debug" option highlights the following line in the sort macro "Range("A2:z" & lastcell).Sort key1:=.Columns(1)". This is driving me crazy, as the macros worked perfectly under the older version of Microsoft. Is there an issue with crossfunctionality between '03 and '07'.
Private Sub Worksheet_change(ByVal target As Excel.Range)
If target.Column = 1 Then
ThisRow = target.Row
startRow = 1
i = 1
Set ws = ActiveSheet
maxRow = Cells.SpecialCells(xlLastCell).Row
maxCol = Cells.SpecialCells(xlLastCell).Column
ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
Do While i
View 9 Replies
View Related
Aug 3, 2009
I'm trying to use a formula for column F, starting in cell F6, for column M, starting from M26. The formula works in Column F but after I tried to use it in column M with adjustments, it doesnt work. Attached is the file.
View 3 Replies
View Related