• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Put secure data column

Visor

Member
Forum Dear friends, hoping that they are going through an excellent final days of 2015.
Today I put my personal project finished teaching excel. By Macro support Grandmaster Antonio have seen placing a utility assistance to students automatically to all those included in a list that reaches the cell 76 and to the CD column I upload the file.
The problem I have is that, after activate the check of row 6, select the students who did not attend and I put zero (0) and those who have not attended since the beginning (they left) I delete them with the Techa from or deleted (left blank cell), so far so good. But when error passes the mouse pointer with the same letter Windign2 of row 6, she runs, it turns off automatically, ie all checks positions, then I have to put again to review the signed documents support to correct deleted as it was before the error, unintentional deletion.
Before this I wish I could collaborate with a secure code. For example if I write the letter s in any column of row 5 (from C5 to CD5) stays with insurance already being deleted inadvertently, only that function is disabled if I take the s (to remove if you can disable or enable checks), putting s hang with this in any cell in the column where the s in the range C7: CD76.

I found several codes, I tried something quite extensive.
I try to test it with A1 when placing s desire from stalling, I tried it on a module sheet not so soon, but I see that does not quite work may help to provide clues.
Thank you in advance for your help
 

Attachments

  • Poner un Seguro al cambio de datos de la columna.rar
    28.8 KB · Views: 2
I am sorry
I upload file .rar because in other forums let not upload files if they are not compressed and have been driven by inertia. Now that you question, I tried upload file direct and see is OK. Confirm if you have problems .rar to upload the file again without rar
 
@Visor
Here, only '.rar -file' option.
So far, I don't upload program to use .rar-files.
And, if You get an answer from other sites, please let us know too.
 
Thanks, usually only an issue I go to a forum, and only in case of no solution I come to another forum. I got an answer and is very practical and simple
by Macro Antonio
If ActiveCell.Row > 5 And _
ActiveCell.Column > 2 Then
If Cells(5, ActiveCell.Column).Interior.Color = vbRed Then
Cells(5, ActiveCell.Column).Select
Exit Sub
End If
End If

If you have no choice, I hope you can share
For example, how would the code, if instead of fill color, I use a letter?

"s"
 
@Visor
If no usable file then no answer.
Your 'few lines answer' checks cell's coordinate and interior.color,
what is connection with Your question; secure?
But if it works for You, that's good.
 
@Visor
1) Something not match ... in the beginning ... that file shows ...
Screen Shot 2015-12-30 at 18.56.50.png
... and 'Debug' wasn't good choice.
Something missing ... or who knows?
2) I cannot figure Your 'Put secure data column' idea, terms ... terms?
I would like to think/try more ... if I could get an idea what do You need.
3) Your found 'answer' is very active ... maybe too much?
4) Still, I don't upload external program which could use .rar -file.
Anyway, if the answer You got is Okay, that's good.
 
I use Excel 2013 64bit
I do not have that error.
I appreciate your interest in this topic

I used google translator, to communicate with you
 
@Visor - nice to meet both of You.
I use 2011 Version.
I don't know, if there is possible to save that file for another format.
Anyway, that file has something not match with my version of Excel.
If You need another answer to You this case.
You should try explain You case one more time.
Short sentences and if possible with samples.
 
I think it would be that you can put together your own sheet with Excel do not know how to do to previous versions because the VBA would vary

Place in the VBA of the Sheet1, the following:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'lock, red filling column any cell
If ActiveCell.Row > 6 And _
  ActiveCell.Column > 2 Then
  If Cells(6, ActiveCell.Column).Interior.Color = vbRed Then
      Cells(6, ActiveCell.Column).Select
      Exit Sub
  End If
End If
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

vcolor = Target.Interior.Color
If Not Application.Intersect(Target, Range("C6:CD6")) Is Nothing Then
    Target.Interior.Color = VBA.IIf(vcolor = VBA.vbRed, xlNone, VBA.vbRed)
    Cancel = True
End If

If Intersect(Target, [C8:CD77]) Is Nothing Then Exit Sub
        'To lock the cells in column, on that day when no one works
        If Cells(6, Target.Column).Value = "n" Then
        Target.Value = ""
        Exit Sub
        End If
 
    If Target.Value <> "" Then
        Target.Value = ""
    Else
        'We get the number of day of the week according to the date row 5 where are the dates..
        ndia = Application.WorksheetFunction.Weekday(Cells(5, Target.Column), 2)
        'We put the value of the hours
        Target.Value = Range("B2").Offset(0, ndia).Value
    End If
    ActiveCell.Offset(0, 1).Select
End Sub
Sheet1 set to the following:
upload_2015-12-30_18-11-47.png
Define name to the days of the week, starting with Monday to Friday; since C2..to ..G2. (five days)
Conditional format, select custom icon, check

When you are done ...Ok

First you double click on C8 and C9, then C6, and see the results
 
@Visor
Why did You used 'Conditional Formating' with row 4?
'My Excel versio's VBA ' don't 'understand conditional formating cell colors'!
This always uses the real cells colors; this case ~light green.

I could do something like this:
Row 5 - You can select n or s by dropdown ( from P1:p2 )
-- 's' allows editing rows 6..[16]
-- 'n' don't allow
Macros can make much more simply, but now it's easier to make more options.

Did You mean something like this?

PS. I didn't find code for this ... nor any use for it?
Screen Shot 2015-12-31 at 11.22.37.png
and
for some reason after upload You files, my File-menu come unstable..
I edit Macros and then I go back to worksheet, File-menu was unenabled as well as few more menus ... so far I solved it. Maybe 64bit Excel? Who knows?
 

Attachments

  • spanish.xlsm
    54 KB · Views: 3
Why did You used 'Conditional Formating' with row 4?
I used to get other required characteristics

This works perfect!!!
With regard to making sure you've got 255 code words using letter "n" or "s", and this makes the fill color than the other code. I prefer the letters as the fill color I have had problems.
thanks for this solution.

Observation
1) Good!! 2, 3 is hide 2) Its not good; 2, 3 must be hide
1) upload_2016-1-1_5-40-20.png 2)upload_2016-1-1_5-36-4.png
No problem, I can with this

I am sorry
I think we should mention forum version of excel. Minor versions should not open higher, I think so
This issue is solved
happy New Year
 
@Visor
That sheet has test pattern; many tests not necessary all right way filled.
If should 'reset' before knows how do it work and look.
The code has a lot of lines. I didn't clean it at all.
For example, 'n/s' part could be much simple,
but now You could see what do 'n or s' mean then You're making selection.
Some(many)times, it's easier to make test version and then it seems to work as well as wanted, start to 'clean' extras away.
> Minor-versions can use Higher-versions files, sometimes Higher version would save it for Minor-version. Something same challenge is with different operation systems, I use IOS ... many use Windows.
Just, have to find the right way to do things.
 
Back
Top