I have a column of Attachment type. I want to create a formula based on the number of uploaded/attached files. How can I count the number of uploaded/attached files in that column?

# Formula for counting number of attachments

**W_Vann_Hall**#2

This is a clever trick suggested by @Simon_Brown: Given an Attachment field `{Attached}`

, the formula to count the number of attachments is

`IF(`

`LEN({Attached}=0,0,`

`LEN({Attached})-LEN(SUBSTITUTE({Attached},",",""))+1)`

This works because Airtable casts `{Attached}`

as a comma-separated string of concatenated `RECORD_ID`

s. The formula then compares the length of the string with the length of the same string with commas removed (plus 1, to make sure single attachments get counted).

**Kenston**#3

This workaround works! Thanks!

Just a little of syntax typo (missing closing parenthesis for first LEN):

```
IF(
LEN({Attached})=0,0,
LEN({Attached})-LEN(SUBSTITUTE({Attached},",",""))+1)
```