13/4/2019
Comma separated variable or .csv files are simple text files that can be created or read using any spreadsheet, statistical, or text editing software (e.g. even NotePad or TextEdit!!). There's no reason why you need to use Excel to create this file, but that was the request:
Open Excel (File… New) and create a new worksheet
The first row must contain the variable names required for analysis. Order doesn't matter and extra columns will be ignored, but please pay attention to spelling and case
The date format for entering the date of birth (dob) and date of visit (dov) will depend on your version of Excel and how you have configured preferences/ languages:
I will now calculate agemons
(age in months) in cell F2. The WHO recommends a conversion factor of 30.4375 days per month. Since my Excel installation returns date differences in days, cell F2 will look like this:
= (E2-D2)/30.4375
Alternatively, if you prefer age in calendar months
= DATEDIF(D2, E2, "m")
You can now enter additional rows. You may want to use the Fill Down
function to extend the calculation in cell F2 to the new rows. Check the Help menu if you're unsure where to find it on your version of Excel: