Search for a text and then search for another text after that cell

AJESHKDY

New Member
Joined
May 21, 2020
Messages
2
Office Version
  1. 2007
Platform
  1. Windows
Hello all,

I have attached a sample sheet to better understand my problem.

What I need is, search for "Location: KL" in column A of Sheet1 and then search for "Product 1" in the same column, but include only the cells after the text "Location: KL" in the search. Then get the "Product Quantity" value corresponding to "Product 1").

The formula is to be in B2 of Sheet2.

Any help is appreciated.

Sheet1:

sample.xlsx
AB
1DescriptionProduct Quantity
2some textsome text
3some textsome text
4some textsome text
5Location: TN
6Product 220
7Product 510
8Product 815
9Location: AP
10Product 210
11Product 145
12Location: KL
13Product 515
14Product 130
15Product 225
16Product 825
Sheet1



Sheet2:

sample.xlsx
AB
1DescriptionProduct Quantity
2Product 1equal to -> search for "Product 1" under "Location: KL" in Sheet1 and get Product Quantity (30).
3Product 2
4Product 3
5Product 4
6Product 5
7Product 6
8Product 7
9Product 8
10Product 9
11Product 10
Sheet2
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Search for a text and then search for another text after the row containing the first text
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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