lookup valuest at multiple sheets

Zoli

New Member
Joined
Feb 15, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello all.

I new here so I hope I write my question at right place. I need your help.

I have a workbook with multiple sheets and I create one sheet called DATA+sheetlist of all sheets at workbook.
At all sheets In column B3:B1000 I have order numbers at columns C3:C1000 company names and at columns R3:R1000 values.
At DATA sheet at column B3:B1000 I create order numbers + company names which I need (order number&" "&company name) as example: 2002514 CCLA-PBC-S5F
So what exactly I need is to return the sheet name at DATA sheet at columns C3:C1000. So lookup value (cell B3 till B1000 at DATA sheet) check columns B and C at all sheets at workbook, if match check column R and if this value is bigger than 0 he will return the sheet name.

Is it possible with functions?

thank you guys
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your DATA sheet and one or two of the other sheets. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
Let us know if this is close to what you want to do. The list of worksheets present in your workbook is shown in column G of the DATA sheet. It sounds as if you have concatenated Order Numbers and Company Names in column B of the DATA sheet. I am assuming that the first space appears between the Order Number and the Company Name (something is needed to understand how to split the text string). Sample worksheets showing Order Numbers and Company Names and Values are shown further below.
MrExcel20210215.xlsx
BCDEFG
1order numbers have no spaces
2Order # + Company NameValuessheetlist
3ccd-324 hotel302Sheet 1
4bcd-225 foxtrot203Sheet 2
5abc-124 bravo102Sheet 3
DATA
Cell Formulas
RangeFormula
C3:C5C3=IFERROR(VLOOKUP(LEFT($B3,FIND(" ",$B3)-1), INDIRECT("'"&INDEX($G$3:$G$5, MATCH(TRUE, COUNTIFS( INDIRECT("'"&$G$3:$G$5&"'!B3:B100"), LEFT($B3,FIND(" ",$B3)-1), INDIRECT("'"&$G$3:$G$5&"'!C3:C100"), RIGHT($B3,LEN($B3)-FIND(" ",$B3)) )>0,0)) & "'!B3:R100"),17,0),"not found")
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.

MrExcel20210215.xlsx
BCR
1Order NumbersCompany NamesValues
2abc-123alpha101
3abc-124bravo102
4abc-125charlie103
Sheet 1

MrExcel20210215.xlsx
BCR
1Order NumbersCompany NamesValues
2bcd-223delta201
3bcd-224echo202
4bcd-225foxtrot203
Sheet 2

MrExcel20210215.xlsx
BCR
1Order NumbersCompany NamesValues
2ccd-323golf301
3ccd-324hotel302
4ccd-325india303
5ccd-326juliet304
Sheet 3
 
Upvote 0
Try:
VBA Code:
Sub GetSheetName()
    Application.ScreenUpdating = False
    Dim pName As Range, fnd As Range, desWS As Worksheet, ws As Worksheet
    Set desWS = Sheets("Data")
    With desWS
        For Each pName In .Range("C4", .Range("C" & .Rows.Count).End(xlUp))
            For Each ws In Sheets
                If ws.Name <> "Data" Then
                    Set fnd = ws.Range("C:C").Find(pName, LookIn:=xlValues, lookat:=xlWhole)
                    If Not fnd Is Nothing Then
                        If fnd.Offset(, 7) > 0 Then
                            pName.Offset(, 1) = ws.Name
                            Exit For
                        End If
                    End If
                End If
            Next ws
        Next pName
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Thank you mumps.

Is it possible with functions?
 
Upvote 0
You are very welcome. :) If by "functions" you mean formulas, I don't think it is possible.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top