Move specific cells information based on criteria from multiple sheets to one sheet
Hi folks,
I am a novice to macros, reaching out to the experts community for the support.
Please find attached the sample excel sheet explaining the requirement. Employee A/B/C will input the details in their respective tabs. On the "Results" tab, I need the output similar to as mentioned on the click of the button "Click to view results".
If any of the fields are filled or the answer is Yes to any question in the tabs A/B/C, it should appear in the output "Results" tab. There are numerous employee tabs as such with many fields to fill-on. The fields could vary based on employees. Hope I am clear with my explanation.
According to your attachment a VBA demonstration as a beginner starter :
PHP Code:
Sub Demo1()
Dim Rc As Range, S&
Set Rc = [E8]
Application.ScreenUpdating = False
With Me.UsedRange.Rows
If .Count > 4 Then .Item("5:" & .Count).Clear
End With
[D7].Formula = "=AND(E5>0,E5<>""No"")"
For S = Me.Index + 1 To Sheets.Count
With Sheets(S)
With .Range("D4", .Cells(.Rows.Count, 5).End(xlUp))
.Rows(1).Value2 = [{" "," "}]
.AdvancedFilter xlFilterInPlace, [D6:D7]
.Copy
Rc.PasteSpecial xlPasteValuesAndNumberFormats
.Rows(1).Clear
End With
If .FilterMode Then .ShowAllData
If Rc(2).Text > "" Then
Rc.Font.Bold = True
Rc.Value2 = .Name
Set Rc = Rc.End(xlDown)(4)
End If
End With
Next
[D7].Clear
With Me.UsedRange.Columns(2)
.Replace "Do you have availability?", "Availability"
.Replace "Do you have the required skillset?", "Skillset"
.Replace "How many additional resources do you need?", "Additional Resources Needed"
.Replace "How many you can make in a week (approx.)?", "Make in a week (approx.)"
.Replace "Do you need any training?", "Training Needed"
End With
[D4:I4].Resize(Rc.Row - 5).BorderAround [D4].Borders(xlEdgeLeft).LineStyle
Application.ScreenUpdating = True
Set Rc = Nothing
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » ! ◄ ◄
The VBA code is absolutely working fine for what I have requested for. Can you please add 2 more things?
1. Two headers at the top in the "Results" tab, whose value is equal to the summation of respective values from each tab? This is explained in the sample sheet attached.
2. Is it possible if I don't want some of the details on the "Results" tab (highlighted in green color) as inputted by Employee A in respective tab?
Extremely apologies as I have not mentioned these at the first time. Actually these requirements came up now.
Bookmarks