I've tried using all the formulas from: http://www.contextures.com/xlDataVal08.html
and they will not work. I can't figure out why.
I've tried using all the formulas from: http://www.contextures.com/xlDataVal08.html
and they will not work. I can't figure out why.
Your code has a Reference error
Select the field where the #REF should be pointing to.=ROUND(IF(AND(OR(ISBLANK(C5),ISBLANK(C4),ISBLANK(C3),ISBLANK(#REF!))),"",C5-C4),4)
You could use the below calculation to produce a zero, if field B5 or C5 is blank/empty
Or use the below calculation to show nothing/blank field, if field B5 or C5 is blank/empty=IFERROR(ROUND(IF(AND(OR(ISBLANK(B5),ISBLANK(B4),ISBLANK(B3))),"",B5-B4),4),0)
=IFERROR(ROUND(IF(AND(OR(ISBLANK(B5),ISBLANK(B4),ISBLANK(B3))),"",B5-B4),4),"")
Thanks for the reply that was actually the next issue I needed to address! Also for my original issue in the formula:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("A1,B3,D9")) Is Nothing Then
ActiveWindow.Zoom = 100
Else
ActiveWindow.Zoom = 120
End If
End Sub
Is there anyway to set the ActiveWindow.Zoom for non drop listed cells to where it doesn't zoom at all?
Last edited by pahickham; 06-16-2017 at 09:02 AM.
Still a work in progress but here what I found to work thus far. With a little code manipulation, the code could actually do what you want.
* You must select an empty cell to reset the zooming
Source: https://www.youtube.com/watch?v=r65mICOUQcA
There are 3 codes
Code #1:
Code #2:Private Sub Worksheet_SelectionChange(ByVal Target As Range) Zoom_Cells End Sub
Code #3:Sub Zoom_Cells() Dim sel As Range, cell As Range, zoom_in As Single Set sel = Selection zoom_in = 1.25 'Zoom rate For Each cell In Selection 'if there are blank cells in selection, shapes are deleted and ended method If cell.Value = Empty Then Call remove_picture GoTo here: Exit Sub End If Next Call remove_picture 'Remove any existing zoom piture Application.ScreenUpdating = False sel.CopyPicture Appearance:=xlScreen, Format:=xlPicture 'Create zoom picture ActiveSheet.Pictures.Paste.Select With Selection .Name = "Zoom_Cells" With .ShapeRange .ScaleWidth zoom_in, msoFasle, msoScaleFromTopLeft .ScaleHeight zoom_in, msoScaleFromTopLeft With .Fill .ForeColor.SchemeColor = 44 .Visible = msoTrue .Solid .Transparency = 0 End With End With End With here: sel.Select Application.ScreenUpdating = True Set sel = Nothing End Sub
Sub remove_picture() Dim k As Object For Each k In ActiveSheet.Pictures If k.Name = "Zoom_Cells" Then k.Delete End If Next End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks