2 Questions

K

KellyMcG03

Q1) I have 2 different formulas in 2 different columns, now no matte
what I want these formulas in those columns all the way down. Is ther
a way to fill an entire column with the following formulas, beside
using the fill option?

=IF($G10="",(IF($K10="",(IF($D10="","",(SUM(EDATE($B10,12)+$I10)))),"")),"")

=IF($G10="",(IF($D10="","",(IF($C10="","",(SUM(EDATE($C10,12))+$I10))))),"")

Q2) Is there a way to lock only certain cells or columns withou
locking the entire worksheet (not "Protect Sheet" or "Protec
Workbook")
 
F

firefytr

1) Select the entire range you want the formula copied to, starting wit
the uppermost cell (assuming your range is contiguous), enter you
formula -in the forumula bar-. Confirm with Ctrl + Enter, instead o
just enter, range will automatically fill with formula.

2) Short answer, no. What you'd need to do is select all the cell
that you do not want locked first, go to Format Cells.. -> Protectio
(tab), uncheck Locked. Then go to Tools -> Protection -> Protec
Sheet. If using Excel 2002 (XP) or above you have many more options a
to what you want the end user to be able to do after protection i
enabled
 
S

scott

2) I have never tried this, but can data validation be used to
accomplish this?

DataValidation-Allow Text Length = 0. Can't be edited, and gives
annoying error message.
 
D

Dave Peterson

For Q2, you could use an event macro looking for a change. If the change is in
the range that shouldn't be changed, undo the action and issue a message.

Define a range called "myLockedCells" (insert|Name|define) for those "locked"
cells.

Then rightclick on the worksheet that should behave that way, select view code
and paste this in:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Me.Range("mylockedcells")) Is Nothing Then
Exit Sub
End If

On Error GoTo errHandler:

With Application
.EnableEvents = False
.Undo
End With
MsgBox "Please don't change those cells!"

errHandler:
Application.EnableEvents = True

End Sub

Then back to excel and test it out.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

But be aware if the user chooses not to enable macros -- or just disables
events, then this won't protect anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top