determine which number is not displayed

dave2018

Board Regular
Joined
Mar 20, 2018
Messages
223
in a1: 57
in a2: 35
in a3: 22

these numbers may change.

In c1 and c2 will be 2 of those numbers.
What is the most eficient formula in c3 to display the third number.


In addition, if in a vba code i have 2 variables, each with a different value from a1:a3. How do i get 3rd variable to be the other value?

Thank you.
 

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.
Confirm with Ctrl+Shift+Enter:
=INDEX(A1:A3,MATCH(1,--ISERROR(MATCH(A1:A3,C1:C2,0)),0))

For your VBA query, it's probably easiest to loop through the range of cells and compare them to the variables, e.g

Code:
 For Each c in rng
If c <> var1 and c<>var2 Then
var3 = c
Exit For
End If
 
Upvote 0
formula in c3 to display the third number

=a1*(countif(b1:b2,a1)=0)+a2*(countif(b1:b2,a2)=0)+a3*(countif(b1:b2,a3)=0)
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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