IF function, beginner. Adding a N/A, or missing, in a formula with a simple equation

Samshaw77

New Member
Joined
Feb 10, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm collecting data from a large number of language tests. One variable is age, and students have written year of birth. However a number of students have left the question blank. In the worksheet I would like to include a formula that gives me either the age or that the information is missing.

I have simple equation in the cell to calculate age from year of birth: =2023-H3 (where H3 is year of birth).
I've been trying the IF function to get the cell to either calculate age or, through a code, like "1", to make the cell say "missing" or "n/a".
I've tried versions of =IF(H3=1,"missing","2023-H3") but unable to get it to work. (been reading/watching tutorials but not finding what I'm looking for)

(at the moment I'm leaving H3 blank when the students haven't given year of birth, but it's giving me students that 2023 years old!)

Grateful for a solution, or any suggestions on where to look!

Sam
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & Welcome to MrExcel.

Try

Excel Formula:
=IF(H3="","Missing",2023-H3)
 
Upvote 0
Thank you for the reply! :)
Unfortunately not getting it to work, not sure why it won't.
/Sam
 
Upvote 0
You need to post some rows of your data to show us an example.
and what error you are getting.
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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