Your technology certification is waiting. Enroll in Cloud Class ®
Function DemoFunction() As Double
Dim cel As Range
Dim dblGB As Double, dblMB As Double, dblKB As Double
For Each cel In Range("D1:A5").Cells
Select Case Right(cel, 2)
Case Is = "GB"
dblGB = dblGB + Left(cel, Len(cel) - 2)
Case Is = "MB"
dblMB = dblMB + Left(cel, Len(cel) - 2)
Case Is = "KB"
dblKB = dblKB + Left(cel, Len(cel) - 2)
DemoFunction = (dblGB * 1024) + (dblKB / 1024) + dblMB
Open in new window
This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.
I will leave you with a valuable tip: plug the formula in and use Excel's Evaluate Formula function to see how it works ;-)
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.