If MATCH function where number not found

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
If I have a sequence of numbers running vertically in column A, e.g

1901
1902
1903...up to 1952

If I have a number in cell G3 that is not found in my list, eg 1953, I want the function to then give me the number provided in G4 instead

I know i'll want an IF function but cant figure it out. Hopefully that makes sense

Any ideas please anyone?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
What do you want to return if G3 is found in the list?
 
Upvote 0
Ok, how about
=IF(ISNA(MATCH(G3,A2:A20,0)),G4,H3+1)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Hi,

Another way using COUNTIF:

=IF(COUNTIF(A1:A52,G3),H3+1,G4)
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,107
Members
452,544
Latest member
aush

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