Problem:

Listed in columns A:B are file names and their sizes (KB, MB or GB).
How could we total MB file sizes only?

Solution:

Using the FIND and LEFT text category functions, in the following Array formula:
{=SUM(IF(ISNUMBER(FIND(C8,B2:B5)),VALUE(LEFT(B2:B5,FIND(C8,B2:B5)-2)),0))}

File name______File Size
file1__________20 MB
file2__________ 30 KB
file3__________ 1.2 GB
file4__________ 400 MB