Apply Missing number Based on another Cell Value

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
624
Office Version
  1. 2016
Platform
  1. Windows
in cell B1 I have the following code:

Code:
=SMALL(IF(COUNTIF($A$1:$A$153,ROW($1:$153))=0,ROW($1:$153),""),ROW(A1))
and Pressed CTRL + SHIFT + ENTER


Where it finds the missing number in column A1:A153 However, I would like it to Display that value in B1 in C1 only if Sheet2!C(# thats missing) = "<>", otherwise check the next value. EX

SHEET 1
ABC
21
35
46
78
910
1211

<tbody>
</tbody>

Right now the results would show as above but I want C1 to Check IF(Sheet2!C1= "<>",B1, Go to next value in column B) than to apply the B1 in C1 otherwise go to next value in column B. C2 to check Sheet2!C5 = "any Text" than value 5 in C2. C3 to check Sheet2!C6 =" " than Value 6 is not recorded in C3 to next check value Sheet2!C8 = "Any Text" than value 8 is in C3 . So the check Sheet2!C(# thats in column B)

Sheet 2
ABC
3-15
4-16
OFF
8-15
OFF
ON
ON
OFF
ABC
13

<tbody>
</tbody>

So based on Sheet 2 above Sheet 1 Column C Results should be

SHEET 1
ABC
211
355
468
7811
910
1211

<tbody>
</tbody>

I think I need to add a Vlookup or Index to the Above code just dont know how to make it work
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,061
Messages
6,122,921
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