im a VBA newbie. I have to create function, that transform state address to state full name eg. CA -> California and apply it to the whole column with addresses. Given task:
*Open VBE and add module named modFunction. In this module create function (named this function StateFullName) which transform state address into state full name. Function should take one parameter (state address) and return one string value (state full name)
In column 7 each rows with data should have full state name (Tip: use loop and function prepared in modFunction).*
I have created a function, but now I don't know how to apply it in sub with loop.
My function:
Function StateFullName(state_address As String) As String
Select Case state_address
Case "CA": StateFullName = "California"
Case "AZ": StateFullName = "Arizona"
Case "MT": StateFullName = "Montana"
Case "NM": StateFullName = "New Mexico"
End Select
End Function

state = StateFullName("CA"). May also want to make this one aPublic FunctionPublicfunction is spot on. If the function is NOT a UDF, then you'll have to create aSuband create a loop that calls theStateFullNamefunction for each abbreviation and puts the value into a row in column 7.