Creating an advanced Excel system with the functionality you require will involve coding automation using Excel's built-in scripting capabilities, such as Office Scripts (for Excel on the web) or VBA (Visual Basic for Applications) for the desktop version. Here, I will provide you with a step-by-step implementation idea in VBA, which is well-suited for Excel desktop and allows you to efficiently manage forms and auto-generation.
VBA Implementation:
Below is a step-by-step guide and an example VBA script that can help you implement the requested Excel system:
Step 1: Design the Worksheet
- Open Excel and create a new workbook.
- Create one main data sheet and name it
Database.
- Add headers in the first row of
Database:
ID, Nombre, Apellido, DNI, Edad, Teléfono, Dirección, Email, Grupo Familiar, Nivel Educativo, Experiencia Laboral, Habilidades, Preferencia Laboral, Disponibilidad Horaria, Foto.
- Add another sheet for statistics (e.g., named
Statistics) where you can calculate how many people have been offered jobs, accepted jobs, or finished tasks.
Step 2: Enable "Developer" Tab in Excel
- Go to Excel --> File --> Options --> Customize Ribbon --> Check
Developer.
- From the Developer tab, open the VBA Editor (
Alt + F11).
Step 3: Add VBA Code
Below is an example VBA code to:
- Create a form for input.
- Auto-generate the
ID using the first letter of the name, surname, and 5 digits of the DNI.
- Search candidates based on criteria.
- Generate a simple PDF curriculum using the entered data.
Option Explicit
' Function to create an ID
Function GenerateID(nombre As String, apellido As String, dni As String) As String
GenerateID = UCase(Left(nombre, 1) & Left(apellido, 1)) & Left(dni, 5)
End Function
Sub AddRecord()
Dim ws As Worksheet
Dim lastRow As Long
Dim nombre As String, apellido As String, dni As String, edad As Integer
Dim telefono As String, direccion As String, email As String
Dim grupoFamiliar As String, nivelEducativo As String
Dim experienciaLaboral As String, habilidades As String
Dim preferenciaLaboral As String, disponibilidadHoraria As String
Dim foto As String
' Assign the active worksheet to the "Database"
Set ws = Worksheets("Database")
' Prompt user for input
nombre = InputBox("Ingrese el nombre:")
apellido = InputBox("Ingrese el apellido:")
dni = InputBox("Ingrese el DNI (mínimo 5 dígitos):")
edad = CInt(InputBox("Ingrese la edad:"))
telefono = InputBox("Ingrese el teléfono:")
direccion = InputBox("Ingrese la dirección:")
email = InputBox("Ingrese el correo electrónico:")
grupoFamiliar = InputBox("Ingrese el grupo familiar (si aplica):")
nivelEducativo = InputBox("Ingrese el nivel educativo:")
experienciaLaboral = InputBox("Ingrese la experiencia laboral:")
habilidades = InputBox("Ingrese las habilidades:")
preferenciaLaboral = InputBox("Ingrese la preferencia laboral:")
disponibilidadHoraria = InputBox("Ingrese la disponibilidad horaria:")
foto = InputBox("Ingrese la ruta de la foto (opcional):")
' Find the next available row
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row + 1
' Auto-generate ID based on the first letter of Nombre, Apellido, and the first 5 digits of DNI
Dim id As String
id = GenerateID(nombre, apellido, dni)
' Insert data into the worksheet
With ws
.Cells(lastRow, 1).Value = id
.Cells(lastRow, 2).Value = nombre
.Cells(lastRow, 3).Value = apellido
.Cells(lastRow, 4).Value = dni
.Cells(lastRow, 5).Value = edad
.Cells(lastRow, 6).Value = telefono
.Cells(lastRow, 7).Value = direccion
.Cells(lastRow, 8).Value = email
.Cells(lastRow, 9).Value = grupoFamiliar
.Cells(lastRow, 10).Value = nivelEducativo
.Cells(lastRow, 11).Value = experienciaLaboral
.Cells(lastRow, 12).Value = habilidades
.Cells(lastRow, 13).Value = preferenciaLaboral
.Cells(lastRow, 14).Value = disponibilidadHoraria
.Cells(lastRow, 15).Value = foto
End With
MsgBox "El registro se ha agregado exitosamente.", vbInformation
End Sub
Sub SearchCandidates()
Dim ws As Worksheet
Dim searchCriteria As String
Dim i As Long, lastRow As Long
Dim resultFound As Boolean
' Assign the active worksheet to the "Database"
Set ws = Worksheets("Database")
' Prompt user for search criteria
searchCriteria = InputBox("Ingrese el criterio de búsqueda (Nivel Educativo, Habilidades, etc.):")
' Find the last row
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
resultFound = False
' Loop through rows to find matches
For i = 2 To lastRow
If InStr(1, ws.Cells(i, 10).Value, searchCriteria, vbTextCompare) > 0 Or _
InStr(1, ws.Cells(i, 11).Value, searchCriteria, vbTextCompare) > 0 Or _
InStr(1, ws.Cells(i, 12).Value, searchCriteria, vbTextCompare) > 0 Then
MsgBox "Candidato encontrado: " & ws.Cells(i, 2).Value & " " & ws.Cells(i, 3).Value & vbCrLf & _
"ID: " & ws.Cells(i, 1).Value, vbInformation
resultFound = True
End If
Next i
If Not resultFound Then
MsgBox "No se encontró ningún candidato con ese criterio.", vbExclamation
End If
End Sub
Sub GenerateCurriculum()
Dim ws As Worksheet
Dim idInput As String
Dim i As Long, lastRow As Long
Dim curriculum As String
' Assign the active worksheet to the "Database"
Set ws = Worksheets("Database")
' Prompt user for the candidate's ID
idInput = InputBox("Ingrese el ID del postulante:")
' Find the last row
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
' Loop to find the candidate with the given ID
For i = 2 To lastRow
If ws.Cells(i, 1).Value = idInput Then
' Create the curriculum as a string
curriculum = "Curriculum Vitae" & vbCrLf & _
"Nombre: " & ws.Cells(i, 2).Value & vbCrLf & _
"Apellido: " & ws.Cells(i, 3).Value & vbCrLf & _
"DNI: " & ws.Cells(i, 4).Value & vbCrLf & _
"Edad: " & ws.Cells(i, 5).Value & vbCrLf & _
"Teléfono: " & ws.Cells(i, 6).Value & vbCrLf & _
"Dirección: " & ws.Cells(i, 7).Value & vbCrLf & _
"Email: " & ws.Cells(i, 8).Value & vbCrLf & _
"Nivel Educativo: " & ws.Cells(i, 10).Value & vbCrLf & _
"Experiencia Laboral: " & ws.Cells(i, 11).Value & vbCrLf & _
"Habilidades: " & ws.Cells(i, 12).Value
' Print the curriculum to a text box or Option to Save PDF
MsgBox curriculum, vbInformation
Exit Sub
End If
Next i
MsgBox "No se encontró ningún postulante con ese ID.", vbExclamation
End Sub
Explanation of Code
-
AddRecord Subroutine:
- Captures input from the user and saves entries into the
Database sheet.
- Automatically generates the
ID.
-
SearchCandidates Subroutine:
- Allows you to search for candidates by criteria (
Nivel Educativo, Habilidades, etc.) and displays matches.
-
GenerateCurriculum Subroutine:
- Retrieves the candidate's information by
ID and displays a formatted CV (this can also be programmed to save as a .PDF with additional libraries or plugins).
Additional Enhancements
- Create a UserForm for more advanced input and output functionality.
- Use a third-party library or VBA code for exporting the CV as a PDF.
Let me know if you want more help setting it all up!