Home excel with vba formula if then print
Reply: 0

excel with vba formula if then print

user602 Published in May 20, 2018, 11:59 am

I am trying to get this macro to work with excel. It will look at the value of three cells, if any cell is less than 60 it will print it. If not, it will move onto the next name on the data validation and continue. It keeps on printing the entire range.

Sub Macro2()
' Macro1 Macro
' Keyboard Shortcut: Ctrl+Shift+L
Dim r As Long, i As Long

r = Range("SOLDIERS").Cells.Count

For i = 1 To r
    Range("B12") = Range("SOLDIERS").Cells(i)

If e32 < 60 Or g32 < 60 Or h32 < 60 Then
ActiveSheet.PrintOut Copies:=1

Else: End If

Next i

End Sub
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302098 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO