Forum Discussion
Vimal_Gaur
Oct 21, 2023Brass Contributor
Fill values on the basis of Column header and row header
Column Header: Months
Row Header: Employee Names
Data: Present Days
Sheet1: Data
Sheet2: Custom
Get data from Sheet1 and fill Shee2 with intersecting cell value based on Column Header and Row Header.
Plz remember that Sheet1 is just and small example of data this can increased up to thousands of employees.
- Patrick2788Silver Contributor
I've created dynamic items for all relevant ranges in your workbook.
This formula will spill a matrix. No fill handle needed.
=LET( r, XMATCH(CEmployees, Employees), c, XMATCH(CDates, DateHeader), IFNA(INDEX(MonthlyData, r, c), 0) )
.
- rachelSteel Contributor
Hi,
I think you can use INDEX together with MATCH functions for this.
I have attached an excel based on your example file.
- Vimal_GaurBrass ContributorYes, it is working, great thanks.
why is in your sheet the C column is N/A?
I would be grateful and appreciate if your goodself can please explain the following.
Sub SortWorksheetsTabs()
Application.ScreenUpdating = False
Dim ShCount As Integer, i As Integer, j As Integer
ShCount = Sheets.Count
For i = 1 To ShCount - 1
For j = i + 1 To ShCount
If UCase(Sheets(j).Name) < UCase(Sheets(i).Name) Then
Sheets(j).Move before:=Sheets(i)
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub- rachelSteel Contributor
It is "#N/A" because cell C1 in "Custom" sheet is 2/3/2024, while cell N1 in "Data" sheet is 1/3/2024:
I think your VBA code is just trying to loop through all sheets in an excel and re-arrange those sheets in an alphabetical order (based on sheet name).
ā
ā