Help formula in excel !!!

Nguyen Anh Dung

Board Regular
Joined
Feb 28, 2020
Messages
180
Office Version
  1. 2016
Platform
  1. Windows
Hi All,
please help me formular for result in excel.
i have image as below. i want result as column F,G,H,I.
if E4= "Lớp G" then F4=1,G4=2,H4=3, I4=""
the same if E5=" Lớp H" then F5=4,G5=5,H5="", I5=""
the same if E6=" Lớp J" then F6=6,G6=7,H6=8, I6=9

1614303669224.png



Best regards,
Nguyen Anh Dung
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Definitely: F4=1,G4=2,H4=3 ?

And not: F4=2 (because B6 is "a"), G4=1 (because B5 ="b") ,H4=3 ?
 
Upvote 0
See below. If the source data is larger you'll need to adjust the cell reference "$C$33".

Book1
ABCDEFGHI
1
2
3LineJanabcd
4Lot GLot G213
5b1Lot N1918
6a2Lot H45
7c3Lot F1011
8Lot HLot D1517 16
9a4Lot J6879
10b5Lot C131412
11Lot JLot E2021
12a6
13c7
14b8
15d9
16Lot F
17a10
18b11
19Lot C
20c12
21a13
22b14
23Lot D
24a15
25d16
26b17
27Lot N
28b18
29a19
30Lot E
31a20
32b21
Sheet1
Cell Formulas
RangeFormula
F4:I11F4=IFERROR(VLOOKUP(F$3,OFFSET(INDIRECT("B"&MATCH($E4,$B:$B,0)+1,1),,,MATCH(TRUE,ISBLANK(INDIRECT("C"&MATCH($E4,$B:$B,0)+1,TRUE):$C$33),0)-1,2),2,0),"")
 
Upvote 0
See below. If the source data is larger you'll need to adjust the cell reference "$C$33".

Book1
ABCDEFGHI
1
2
3LineJanabcd
4Lot GLot G213
5b1Lot N1918
6a2Lot H45
7c3Lot F1011
8Lot HLot D1517 16
9a4Lot J6879
10b5Lot C131412
11Lot JLot E2021
12a6
13c7
14b8
15d9
16Lot F
17a10
18b11
19Lot C
20c12
21a13
22b14
23Lot D
24a15
25d16
26b17
27Lot N
28b18
29a19
30Lot E
31a20
32b21
Sheet1
Cell Formulas
RangeFormula
F4:I11F4=IFERROR(VLOOKUP(F$3,OFFSET(INDIRECT("B"&MATCH($E4,$B:$B,0)+1,1),,,MATCH(TRUE,ISBLANK(INDIRECT("C"&MATCH($E4,$B:$B,0)+1,TRUE):$C$33),0)-1,2),2,0),"")
Hi Habtest,
Thanks you so much!!!
Best regards,
Nguyen Anh Dung
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,166
Members
448,870
Latest member
max_pedreira

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