Get the value and some data - VBA or Code or Formula

Vishaal

Active Member
Joined
Mar 16, 2019
Messages
408
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
Hi All,

Thanks in advance,

We have the following two data in one sheet,

Excel 2010 32 bit
A
B
C
D
E
F
1
First Data​
2
Marks​
Ram​
Ravi​
Rozi​
Sunny​
Ahmed​
3
45​
Na​
Na​
Na​
Na​
Na​
4
65​
Na​
Na​
Na​
Na​
Na​
5
25​
Yes​
Yes​
Yes​
Yes​
Yes​
6
35​
Na​
Na​
Na​
Na​
Na​
7
26​
Yes​
Yes​
Yes​
Yes​
Na​
8
98​
Na​
Na​
Na​
Na​
Na​
9
78​
Na​
yes​
Na​
Na​
Na​
10
15​
Na​
Na​
yes​
Na​
Na​
11
45​
Na​
Na​
Na​
yes​
Na​
12
13
Total "Na" in continuation from bottom
4​
2​
1​
6​
14
15
Sheet: Sheet1

Second sheet from where we need to get the data

Excel 2010 32 bit
I
J
K
L
M
N
1
Second Data​
2
M​
25​
85​
85​
12​
32​
3
65​
12​
54​
14​
56​
4
67​
32​
52​
17​
45​
5
58​
41​
56​
16​
87​
6
1​
yes​
7
2​
yes​
8
3​
9
4​
yes​
10
5​
11
6​
Yes​
yes​
12
7​
13
8​
14
9​
Sheet: Sheet1


Need the following result

Excel 2010 32 bit
A
B
C
D
E
F
18
Result Is
4​
2​
1​
6​
19
6​
20
21
It’s the M Value​
25​
85​
85​
32​
22
65​
12​
54​
56​
23
67​
32​
52​
45​
24
58​
41​
56​
87​
Sheet: Sheet1

We will check that if value of Range B13:F13 match with range I6:I14 then show the number of row where we have "yes" as given in above sheet and along with that its also show the value of "M" from that coloumn

Help pls
 
Last edited:

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

In cell B21 ... you can test following

Code:
=INDEX(Sheet2!$J$2:$N$2,MATCH("yes",INDIRECT("Sheet2!J"&MATCH(B18,Sheet2!$I:$I,0)):INDIRECT("Sheet2!N"&MATCH(B18,Sheet2!$I:$I,0)),0))

Hope this will help
 

Vishaal

Active Member
Joined
Mar 16, 2019
Messages
408
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
o.k. checking
 
Last edited:

Vishaal

Active Member
Joined
Mar 16, 2019
Messages
408
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
only showing Na

can u upload the working excel file if you can
 

Vishaal

Active Member
Joined
Mar 16, 2019
Messages
408
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
if you suggest we can use second sheet on first sheet
 

Watch MrExcel Video

Forum statistics

Threads
1,114,421
Messages
5,547,824
Members
410,813
Latest member
Vhinzvirgo
Top