If statement using vlookup

eramirez148

Board Regular
Joined
Aug 17, 2022
Messages
54
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
Platform
  1. Windows
  2. MacOS
Is there a way to use a formula in column C that will generate results from column F for the matching dates only for the active rows (Column B) if a row is inactive (Column B) the the results should be an empty cell.

ABCDEF
pos_dateStatusResults
1/1/2021inactiveLook up list
1/2/2021inactivepos_datelist
1/3/2021inactive1/1/2021A
1/4/2021inactive1/2/2021B
1/5/2021inactive1/3/2021C
1/6/2021inactive1/4/2021D
1/7/2021​
inactive1/5/2021E
1/8/2021​
inactive1/6/2021F
1/9/2021​
inactive
1/10/2021​
inactive
1/11/2021​
inactive
1/12/2021​
active
1/13/2021​
active
1/14/2021​
active
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try

Book2
ABCDEFG
1ABCDEF
2pos_dateStatusResults
301-01-2021inactive Look up list
401-02-2021inactive pos_datelist
501-03-2021inactive 01-01-2021A
601-04-2021inactive 01-02-2021B
701-05-2021inactive 01-03-2021C
801-06-2021inactive 01-04-2021D
91/7/2021inactive 01-05-2021E
101/8/2021inactive 01-06-2021F
111/9/2021inactive 
121/10/2021inactive 
131/11/2021inactive 
141/12/2021active#N/A
151/13/2021active#N/A
161/14/2021active#N/A
17
Sheet1
Cell Formulas
RangeFormula
C3:C16C3=IF(B3="Active",VLOOKUP(A3,$E$3:$F$10,2,0),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

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