I have two functions that both determine the output depending on the value in a cell. The outcome is Column N should have a combined output of function mBlineCTG + findShpc. They separately work, I would like to call them on the main function that way I don't have to run both routines separately. Am open to help including the logic behind
Option Compare Text
Sub Main()
M_xx
f_xxx
Cells(i, 14).Value = M_xx + f_xxx
Range("Q1").Value = "xxx_xxxx"
End Sub
Public Function M_xxx()
Dim LastRow As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Dim s_Cxx
Dim i As Integer
For i = 2 To LastRow
Select Case UCase(Left(Cells(i, 10).Value, 1))
Case "s"
s_Cxx = "D"
Case "0"
s_Cxx= "SD"
Case "1", "R", "E", "F"
Select Case UCase(Left(Cells(i, 13).Value, 2))
Case "13"
s_Cxx = "SB"
Case Else
s_Cxx = "SS"
End Select
Case "I"
s_Cxx = "IS"
Case "2", "15"
s_Cxx = "BB"
Case "3"
s_Cxx = "SF"
Case Else
s_Cxx = ""
End Select
Next i
End Function
Public Function f_xxxx()
'declare variables
Dim LastRow As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
'Dim ThisCont
'ThisCont = Range("E2").Value
Dim S_xxx2
'loop thru' rows
Dim i As Integer
For i = 2 To LastRow
Select Case UCase(Left(Cells(i, 5).Value, 1))
'Select Case ThisCont
Case "A"
S_xxx2 = "big-base-Post-01 0 01 Cee-xx-04"
Case "X"
S_xxx2 = "small-shelf-Post-01 0 01 Cee-xx-01"
Case Else
S_xxx2= "big-drawer-Post-01 0 01 Cee-xx-06"
End Select
'Cells(i, 14).Value = S_xxx2
Next i
End Function