Merge the searching of sheets together,

CV12

Board Regular
Joined
Apr 6, 2020
Messages
82
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

I hope i can make it clear to you what I want to do by text:

Excel Formula:
=INDEX(FILTERXML("<F><d>"&SUBSTITUTE(TEXTJOIN(" ";;Sheet2!B1:B5;Sheet3!B1:B5;Sheet4!B1:B5);" ";"</d><d>")&"</d></F>";"//d");MATCH(D8;FILTERXML("<F><d>"&SUBSTITUTE(TEXTJOIN(" ";;Sheet2!F1:F5;Sheet3!F1:F5;Sheet4!F1:F5);" ";"</d><d>")&"</d></F>";"//d");0))

Given this formula, I am looking at Sheet 2, 3 and 4 in the following part:
Excel Formula:
Sheet2!B1:B5;Sheet3!B1:B5;Sheet4!B1:B5

Because the sheets may vary, I would like to intend them. So it would look something like Sheet 2 up until sheet X (Lets take 6 for example). I just do not want to insert all my seperate sheets in this formula. How to do this?

Thank you in advance.
 
Last edited by a moderator:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
In the example below, I referenced the cell E1 on 4 sheets. The sheet tabs must all be contiguous. You can move the sheets in and out of the range of sheets to include or exclude them from the calculation. In the past, I have added a sheet to the left of the series called "BEG" and a sheet at the end called "END" to keep me straight. I included those two sheets in the formula so it would change; in the example at the bottom
=TEXTJOIN(",",TRUE,Sheet1:Sheet4!E1)

=TEXTJOIN(",",TRUE,BEG>:END!E1)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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