Reads setting saved in columns J:R
Just like SettingRead, but when we have multiple setting for one value
Like language settings, or per users settings
Or for those settings that were manually entered, when you do not need the user to manage or control
Reads from the DB in ShD sheet (Data sheet)
ValueColumn is the column to read from, 2 is the 2nd column after ID column (column J here)
Function SettingRead_JR(SettingName, Optional ValueColumn = 2)
' Reads from the DB in ShD sheet (Data sheet) in cols J:R, and return value from col next to Name
' Helpful when we have multiple setting for one value
' Like language settings, or per users settings
NV = WorksheetFunction.CountIf(ShD.Range("J1").Offset(, 0).EntireColumn, SettingName)
If NV = 0 Then
SettingRead_JR = "N/A"
Exit Function
End If
SettingRead_JR = WorksheetFunction.VLookup(SettingName, ShD.Range("J:R"), ValueColumn, False)
End Function
' Reads from the DB in ShD sheet (Data sheet) in cols J:R, and return value from col next to Name
' Helpful when we have multiple setting for one value
' Like language settings, or per users settings
NV = WorksheetFunction.CountIf(ShD.Range("J1").Offset(, 0).EntireColumn, SettingName)
If NV = 0 Then
SettingRead_JR = "N/A"
Exit Function
End If
SettingRead_JR = WorksheetFunction.VLookup(SettingName, ShD.Range("J:R"), ValueColumn, False)
End Function
SettingName, Optional ValueColumn
Views 3,265
Downloads 1,294
CodeID
DB ID
ANmarAmdeen
610
Revisions
v1.0
Tuesday
June
26
2018