Hi all
Re-posting this as I've made some headway since my last post.
In a nutshell, I'm trying to make an automated register based on people who attended meetings.
My current process (from start to finish) is as follows:
Enter meeting details inc. expenditures
Enter date
Select attendees from an activeX listbox
(run a macro to copy list of names onto cell adjacent to the form)
Run a macro which copies all information in the form to 2 other workbooks - 1 of which selects the correct sheet, pastes the date in row 1, and the names in column 1.
What I need to do, is with the names that have been copied across, enter an X under the date that was also pasted in this macro.
I've tried formulas in the cells, a variant of the 'Find' function and the H/V Lookup functions but I can't get them to work.
Thanks
EDIT: I have since solved this through mass trial and error. I was on the right lines, but got there in the end.
The final code is here:
wb4.Sheets("VfM").Activate
Range("N2:N101").Select
Selection.Copy
wb3.Activate
Range("XX2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveCell.End(xlUp).Offset(0, 1).Select
Range("A2").Select 'this selects where my list of names starts.
rsd = Range("XX2:XX203").Value 'list of names copied to find in Col A
Dim prsn
Set prsn = Range("A2:A6000").Find(rsd)
If prsn Is Nothing Then
Else
prsn.Select
ActiveCell.Offset(0, TargetCol).Select
Selection.Value = ("x") 'enters an X in the column underneath where the date is in Row A
End If
For the part "(0, TargetCol).Select", I used a code to find the column letter, and dimmed it as TargetCol
Code below:
ActiveSheet.Range("A1").Select 'Selects row with dates of meetings
ActiveCell.End(xlToRight).Offset(0, 1).Select 'selects the last date in the row and offsets to next to right
TargetCol = ActiveCell.Column 'sets TargetCol as column letter (e.g Column T)
I'm posting this for future reference. In case anyone else would like to automate a registration system from a list of names
Bookmarks