SOLVED

One formula, two possible calculations

Occasional Visitor

Device and OS platform: PC/Windows 10

Excel product name and version number: Microsoft Office 365 Pro Plus

 

I have a spreadsheet that is being used to keep track of social media posts on Facebook and LinkedIn. Each channel has a different character limit. I would like to have column E tell me how many characters I have remaining when I write a social post in column D, given w.

 

This is what I would like the formula to perform:

If the cell in column A equals Facebook, then subtract the character count of the text in column D from 125; but, if the cell in column A equals LinkedIn, then subtract the character count of the text in column D from 150. If neither are true it could either leave the cell blank or return a result of 0.

 

Thanks in advance for your help!

1 Reply
best response confirmed by BrittBon (Occasional Visitor)
Solution

@BrittBon 

In E2:

 

=IF(A2="Facebook",125-LEN(D2),IF(A2="LinkedIn",150-LEN(D2),""))

 

Fill down.