I have a large messy data sheet that I export form a piece of software. I am trying to compile the date into individual forms that then can be printed into PDF's and send back to the users to as a confirmation.
conference room request worksheet sample link https://www.dropbox.com/s/delxygrtvdjseiu/Hospitality Services Room Set-Up Request..xlsm?dl=0
I have done some coding but I have run into a couple of issues One trying to name the new worksheets from two cells A3 and K3. My current code will pull from A3 but have not found the right syntax for getting information from K3
second I have with my if then else statement I need for two part of the data form. I have a range of cells that can have a room number in one of the cells. only one of the cells will ever have a number in it. I though that an if then elseif statement would be the way to populate the cell in the form but I am having trouble with that. I an writing that in a separate module until I get it to work, then I was going to ad it to the loop. below is the statement thanks in advance.
Sub roomnumber()
If Sheets(1).Range("AH3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AH3")
ElseIf Sheets(1).Range("AL3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AL3")
ElseIf Sheets(1).Range("AM3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AM3")
ElseIf Sheets(1).Range("AN3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AN3")
ElseIf Sheets(1).Range("AO3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("A03")
ElseIf Sheets(1).Range("AP3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AP03")
Else
Activeworksheet = Sheets(2).Range("Ell").Value = ("AQ03")
End If
End Sub
conference room request worksheet sample link https://www.dropbox.com/s/delxygrtvdjseiu/Hospitality Services Room Set-Up Request..xlsm?dl=0
I have done some coding but I have run into a couple of issues One trying to name the new worksheets from two cells A3 and K3. My current code will pull from A3 but have not found the right syntax for getting information from K3
second I have with my if then else statement I need for two part of the data form. I have a range of cells that can have a room number in one of the cells. only one of the cells will ever have a number in it. I though that an if then elseif statement would be the way to populate the cell in the form but I am having trouble with that. I an writing that in a separate module until I get it to work, then I was going to ad it to the loop. below is the statement thanks in advance.
Sub roomnumber()
If Sheets(1).Range("AH3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AH3")
ElseIf Sheets(1).Range("AL3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AL3")
ElseIf Sheets(1).Range("AM3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AM3")
ElseIf Sheets(1).Range("AN3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AN3")
ElseIf Sheets(1).Range("AO3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("A03")
ElseIf Sheets(1).Range("AP3") = True Then
Activeworksheet = Sheets(2).Range("Ell").Value = ("AP03")
Else
Activeworksheet = Sheets(2).Range("Ell").Value = ("AQ03")
End If
End Sub