Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Good afternoon, thanks to advice from this site I got pointed in the right direction. I am using a MAXIF formula to continually get the last date and time a piece of equipment was issued or returned. I have a Macro when pressed it will send details to “Signup” and doing so it inserts a row because the latest updates need to be in the top rows. I have entered the following: {=MAX(IF('Sign out '!$C$4:$C$3000='Tool Data'!B3,'Sign out '!$E$4:$E$3000))} and it works perfect. However, as soon as I use the Macro again it changes my MAX if formula like seen here: {=MAX(IF('Sign out '!$C$5:$C$3001='Tool Data'!B3,'Sign out '!$E$5:$E$3001))}. I tried tinkering around with the $$ better that doesn’t seem to matter. I’ve included the Macro. The Macro seems to be working as designed. Any suggestions or help would be appreciated.
Sub SIGNIN1()
'
' SIGNIN1 Macro
'
Range("C28:G28").Copy
With Sheets("Sign in ")
.Range("A3").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Application.CutCopyMode = False
.Rows("3:3").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End With
End Sub
VBA Code:
Sub SIGNOUT1()
'
' SIGNOUT1 Macro
'
Range("C28:G28").Copy
With Sheets("Sign out ")
.Range("A3").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Application.CutCopyMode = False
.Rows("3:3").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End With
End Sub
Sub SIGNIN1()
'
' SIGNIN1 Macro
'
Range("C28:G28").Copy
With Sheets("Sign in ")
.Range("A3").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Application.CutCopyMode = False
.Rows("3:3").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End With
End Sub