find the column

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
884
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I need a column ref. as per below yellow highlighted cell

Book1
ABCDEFGHIJKLMNOPQRS
1
22018201920202021
3ColumnWave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3
42345678910111213141516171819
5
6
720202021
8Wave 2Wave 3Wave 2Wave 3
93434
10
11Output Need13141819
12
13
Sheet2
Cell Formulas
RangeFormula
D9:E9,G9:H9D9=MATCH(D$8,$A$3:$S$3,0)



Thanks in advance
Sanjeev
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try this; Note you will need to put 2020 in E7 and 2021 in H7. ( it get very difficult to pick the cell next to a blank cell with formula)
Excel Formula:
=MATCH(D7,$A$2:$S$2,0)+MATCH(D8,OFFSET($A$3,0,MATCH(D7,$A$2:$S$2,0)-1,1,4),0)
 
Upvote 0
Try this; Note you will need to put 2020 in E7 and 2021 in H7. ( it get very difficult to pick the cell next to a blank cell with formula)
Excel Formula:
=MATCH(D7,$A$2:$S$2,0)+MATCH(D8,OFFSET($A$3,0,MATCH(D7,$A$2:$S$2,0)-1,1,4),0)


Thank you so much it works for me.

But there is some instance we don't have year data in the row num2 we will just Wave 1, Wave 2 reapltly like (row no 3)

so do we have any other option we can give an array to no Row 3

I know it bit tricky but just need some idea on this :)

Thanks in advance.

Regards,
Sanjeev
 
Upvote 0
But there is some instance we don't have year data in the row num2 we will just Wave 1, Wave 2 reapltly like (row no 3)
So how would you expect anybody even a human to work out how to match it
 
Upvote 0
So how would you expect anybody even a human to work out how to match it

Hi,

For example, i have Wave 1 and Wave 2 multiple columns with the same name but with match function, I will get 1 and 2 only so do we have any other option where we can get actual column with the formula.

i know its challenging but just wanted to check with you and team:)

Regards,
Sanjeev
 
Upvote 0
I don't think I understand your question. In the formula I gave you the bit which occurs twice:
Excel Formula:
MATCH(D7,$A$2:$S$2,0)
is looking at row 7 with the years in it. This is what is selecting which column to start looking for the Wave 1 and Wave 2 etc. SO unless you have data in both rows you can't find the combination of year and wave value. I don't see any way round that fact. If you just look for wave 1, you have got 4 examples in you data , how do you know which one you want?? The answer is you don't, so it is impossible to select one of them without more information.
 
Upvote 0
I don't think I understand your question. In the formula I gave you the bit which occurs twice:
Excel Formula:
MATCH(D7,$A$2:$S$2,0)
is looking at row 7 with the years in it. This is what is selecting which column to start looking for the Wave 1 and Wave 2 etc. SO unless you have data in both rows you can't find the combination of year and wave value. I don't see any way round that fact. If you just look for wave 1, you have got 4 examples in you data , how do you know which one you want?? The answer is you don't, so it is impossible to select one of them without more information.
I don't think I understand your question. In the formula I gave you the bit which occurs twice:
Excel Formula:
MATCH(D7,$A$2:$S$2,0)
is looking at row 7 with the years in it. This is what is selecting which column to start looking for the Wave 1 and Wave 2 etc. SO unless you have data in both rows you can't find the combination of year and wave value. I don't see any way round that fact. If you just look for wave 1, you have got 4 examples in you data , how do you know which one you want?? The answer is you don't, so it is impossible to select one of them without more information.
Hello Sir,

Sorry for the delay i was suffering from Fever.

Now all is well:)

So basically I need column Reff. as per Row number 2 column number


book2
ABCDEFGHIJKLMNOPQRS
1ColumnWave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3Wave 4Wave 1Wave 2Wave 3
2As it is column23457891012131415171819
Sheet1
 
Upvote 0
Your data needs to look like this:
C150921.JPG
 
Upvote 0
Your data needs to look like this:View attachment 46985


Hello Sir,

Thanks again for checking in this

So I have observed in my other sheet most of the column refer are as per post #8 so just wanted to check do we have any other option so that I can get column ref. as per row num 2 :)

I know it is a bit tricky but let me know if we have some alternate things:)

Thanks in advance :)
Sanjeev
 
Upvote 0
with your data as shown in post#7, How are you going to tell which year each set of four waves is the one you want?? There is no year shown anywhere
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

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