Hi Guys,
I am currently making a macro for a button to log queries, I tried to use an IF statement to check if the desired cell is empty, and if not, record the comments on the next cell to the right but it doesn't work, please any help would be much appreciated. See below:
Basically a summary table pulls all data from which a user can submit comments if need be, which would be distributed in the query log.
Thanks in advance for reading this post.
I am currently making a macro for a button to log queries, I tried to use an IF statement to check if the desired cell is empty, and if not, record the comments on the next cell to the right but it doesn't work, please any help would be much appreciated. See below:
Code:
Option Explicit
Sub Comment_Click()
Dim C As Integer
C = [MATCH(Summary!$A$2&$W$6,Query_LOG!$A$1:$A$13184&Query_LOG!$C$1:$C$13184,0)]
Debug.Print C
Worksheets("Query_LOG").Select
Range("D" & C).Select
If ActiveCell = False Then
ActiveCell = [Summary!A2&" "&Summary!W6&" "&Summary!M5]
Else: ActiveCell.Offset(0, 1) = [Summary!A2&" "&Summary!W6&" "&Summary!M5]
End If
MsgBox "Query Logged!"
Worksheets("Summary").Select
End Sub
Basically a summary table pulls all data from which a user can submit comments if need be, which would be distributed in the query log.
Thanks in advance for reading this post.