Formula to return value if cells above and below are populated

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

I’ve got a vlookup in one sheet that looks up data from another sheet.

However, there are a number of instances where there is no matching data, so the formula has been written to return a blank instead of an error.

But I’d like to to create a formula which returns the value of the cell below the active cell IF the value of the cells above and below the active cell are the same

Eg

If cell A1 had the word “Cool”

Cell A2 was blank and

Cell A3 had the word “Cool”

I’d want the value of cell A2 to be “Cool.”

Has anyone done this before?

TIA
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Just add the IF condition, something like:

=if[and(vlookup(...)="", A1=A3),A1, vlookup(...)]

I hope it helps!
 
Upvote 0
Ok, cool!

Thanks - I’ll try that out tomorrow!
 
Upvote 0
Thanks - I initially got a circular reference error when I tried to combine all the info in one formula, but I added in a new column and was able to create a formula which did what I wanted using the elements of what you described above.

Thanks again for your response.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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