Forum Discussion
ilker_d
May 24, 2019Copper Contributor
Value Search On 3 Criteria
Good morning buddies, I'm trying to find a formula that kind search in multiple criteria. (see attachment for the Excel sheet) It needs to search in the Groups in Sheet ''1'', From there it need...
Berndvbatanker
May 24, 2019Iron Contributor
Hi,
i create a userdefinded function. Certainly there is also a formula for this, but i like VBA
Function GetData(strGroup As String, strNr As String) As Double
Dim rngFindColumn As Range
Dim rngFindRow As Range
Set rngFindColumn = Tabelle2.Rows(2).Find(what:=strGroup, lookat:=xlWhole)
If Not rngFindColumn Is Nothing Then
Set rngFindRow = Tabelle2.Range("A:A").Find(what:=strNr, lookat:=xlWhole)
If Not rngFindRow Is Nothing Then
GetData = Tabelle2.Cells(rngFindRow.Row, rngFindColumn.Column).Value
End If
End If
End Function
call from cell B3: =GetData($B$1;$A3)
Regards
Bernd
https://vba-tanker.com/
- ilker_dMay 24, 2019Copper Contributor
Thank you for your reply but I don't know what a VBA means.
Isn't there just a formula that I can add into cell B3?
- TwifooMay 24, 2019Silver ContributorPerhaps you need to manually enter your desired results, then attach your file again so I can understand the logic of the formula you need. Formula, not VBA, should be the default solution.