Multiple HLOOKUP in IF formula

KopiSusu

New Member
Joined
Jul 16, 2023
Messages
9
Office Version
  1. 2019
Platform
  1. Windows
Hi there,
I need your help to build a IF formula with multiple HLOOKUP in it.
Thank you in advance.

Formula rules:
This column is in Row-2Result Color
showed in Col-B
Result Vol
showed in Col-C
x < -299WHITE30
-300 < x < -100WHITE20
-101 < x < 1BLACK10
0 < x < 101WHITE10
100 < x < 300BLACK20
x > 299BLACK30

The Simulation Spreadsheet
DAY-1DAY-2DAY-3DAY-4DAY-5DAY-6DAY-7DAY-8DAY-9DAY-10DAY-11DAY-12DAY-13
X -->-78.1-399.5-413.6-226.5197.6576496.4651.3658.91308.91246.9857.7
Result ColResult Vol
DAY-2BLACK10
DAY-3WHITE30
DAY-4WHITE30
DAY-5WHITE20
DAY-6BLACK20
DAY-7BLACK30
DAY-8BLACK30
DAY-9BLACK30
DAY-10BLACK30
DAY-11BLACK30
DAY-12BLACK30
DAY-13BLACK30
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Create a table like following example
Cols A,B,C
-99999, -300, White, 30
-299,-101,White,20
-100,0,Black,10
1,100,White,10
101,299,Black,20
300,9999999,Black,20

Name the table: TableBWVol

Each row of output is, e.g
Col A,B,C

DAY 2,=VLOOKUP(D$2,TableBWVol,2,true),VOOKUP(D$2,TableBWVol,3,true)

DAY 3,=VLOOKUP(E$2,TableBWVol,2,true),VLOOKUP(E$2,TableBWVol,3,true)
 
Upvote 0
How about this solution?
VLOOKUP Table (TableBWVol)
GetLastRow.xlsm
BCDE
45-999999-300WHITE30
46-299-100WHITE20
47-1010BLACK10
481100WHITE10
49101300BLACK20
50301999999BLACK30
Sheet1


Daily HLOOKUP Table (DailyX - table name)
Columns labeled DAY2 - DAY3 are the DailyX Horizontal table
GetLastRow.xlsm
ABCDEFGHIJKLMNO
17DAY-1DAY-2DAY-3DAY-4DAY-5DAY-6DAY-7DAY-8DAY-9DAY-10DAY-11DAY-12DAY-13
18X -->-78.1-399.5-413.6-226.5197.6576496.4651.3658.91308.91246.9857.7
Sheet2
Cell Formulas
RangeFormula
A17A17="DAY-"&1
D17:O17D17=LEFT($A$17,4)&COLUMN(A17)+1
Named Ranges
NameRefers ToCells
DailyX=Sheet2!$D$17:$O$18G17


Daily Color and Volume List Using HLOOKUP and VLOOKUP
Cell Formulas
RangeFormula
A17A17="DAY-"&1
A20:A31A20=LEFT($A$17,4)&ROW(A20)-ROW($A$17)-1
B20:B31B20=VLOOKUP(HLOOKUP(A20,DailyX,2,FALSE),TableBWVol,3,TRUE)
C20:C31C20=VLOOKUP(HLOOKUP(A20,DailyX,2,FALSE),TableBWVol,4,TRUE)
Named Ranges
NameRefers ToCells
DailyX=Sheet2!$D$17:$O$18B20:C31
TableBWVol=Sheet1!$B$45:$E$50B20:C31


Please Note: The Labels DAY-2 to DAY-13 are calculated labels using the ROW number and COLUMN number of the DAY-1 cell.
This easily facilitates copying the Results Sheet.


Please let me know if you have questions on this implementation
 
Upvote 0
Thank you for your response 🙏
I'm still driving on my home.
Will let you know after I get a chance open my computer.
Once again, thanks!
 
Upvote 0
Hi
Did the example that was sent to you work?

Please set the status of the Post to Solved when you have a working solution
 
Upvote 0

Forum statistics

Threads
1,215,489
Messages
6,125,093
Members
449,205
Latest member
ralemanygarcia

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