```
Sub Trim(sh,FirstCell,LastCell)
    Sheets(sh).select
    Range(FirstCell,LastCell) = [index(Upper(FirstCell,LastCell),)]
End Sub

```

I want to do something like this to make it dynamic. Calling this macro through other application where I'm giving input for sheet name first cell and last cell of the range.