Setting the string value of 'myTerm' based on various cell content combinations











up vote
0
down vote

favorite












Is it possible to set the value of myTerm using a series of If statements?



I have 3 columns in a worksheet which will have data added to them over the course of the year.



I have the following scenarios:



K has data and M & O = "Autumn"

K and M have data and O is empty = "Spring"

K, M and O all have data = Summer



I have written the following (a snippet of the full code):



Sub FilterProgressData()

Dim myTerm As String

If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Autumn"

ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Spring"

ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Summer"


but get a 'Run-time error '1004' error - Application-defined or object-defined error'



Any advice will be gratefully received!



Thanks.










share|improve this question






















  • Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
    – John Coleman
    Nov 22 at 13:12












  • What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
    – Anthony
    Nov 22 at 13:15












  • Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
    – gbra
    Nov 22 at 14:05















up vote
0
down vote

favorite












Is it possible to set the value of myTerm using a series of If statements?



I have 3 columns in a worksheet which will have data added to them over the course of the year.



I have the following scenarios:



K has data and M & O = "Autumn"

K and M have data and O is empty = "Spring"

K, M and O all have data = Summer



I have written the following (a snippet of the full code):



Sub FilterProgressData()

Dim myTerm As String

If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Autumn"

ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Spring"

ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Summer"


but get a 'Run-time error '1004' error - Application-defined or object-defined error'



Any advice will be gratefully received!



Thanks.










share|improve this question






















  • Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
    – John Coleman
    Nov 22 at 13:12












  • What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
    – Anthony
    Nov 22 at 13:15












  • Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
    – gbra
    Nov 22 at 14:05













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Is it possible to set the value of myTerm using a series of If statements?



I have 3 columns in a worksheet which will have data added to them over the course of the year.



I have the following scenarios:



K has data and M & O = "Autumn"

K and M have data and O is empty = "Spring"

K, M and O all have data = Summer



I have written the following (a snippet of the full code):



Sub FilterProgressData()

Dim myTerm As String

If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Autumn"

ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Spring"

ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Summer"


but get a 'Run-time error '1004' error - Application-defined or object-defined error'



Any advice will be gratefully received!



Thanks.










share|improve this question













Is it possible to set the value of myTerm using a series of If statements?



I have 3 columns in a worksheet which will have data added to them over the course of the year.



I have the following scenarios:



K has data and M & O = "Autumn"

K and M have data and O is empty = "Spring"

K, M and O all have data = Summer



I have written the following (a snippet of the full code):



Sub FilterProgressData()

Dim myTerm As String

If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Autumn"

ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Spring"

ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Summer"


but get a 'Run-time error '1004' error - Application-defined or object-defined error'



Any advice will be gratefully received!



Thanks.







excel vba if-statement






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 at 13:04









gbra

337




337












  • Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
    – John Coleman
    Nov 22 at 13:12












  • What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
    – Anthony
    Nov 22 at 13:15












  • Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
    – gbra
    Nov 22 at 14:05


















  • Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
    – John Coleman
    Nov 22 at 13:12












  • What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
    – Anthony
    Nov 22 at 13:15












  • Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
    – gbra
    Nov 22 at 14:05
















Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
– John Coleman
Nov 22 at 13:12






Your error has little to nothing to do with the fact that you are using If statements. Without a Minimal, Complete, and Verifiable example it is impossible to tell what is causing the error. The problem almost certainly lies in code that you have decided to not show.
– John Coleman
Nov 22 at 13:12














What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
– Anthony
Nov 22 at 13:15






What is Variable SrcWs? It needs to be defined. If it is a worksheet then you need. Dim SrcWs As Worksheet.
– Anthony
Nov 22 at 13:15














Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
– gbra
Nov 22 at 14:05




Thank you for these comments - the other variables are defined and set appropriately, I was trying to give you the minimal code that i have added which caused the error when testing. I'll try the change as outlined below and, if I still have issues, will post a fuller version of the code.
– gbra
Nov 22 at 14:05












2 Answers
2






active

oldest

votes

















up vote
0
down vote













This works fine. I do not see a problem with your if statement.



Option Explicit

Sub FilterProgressData()
Dim myTerm As String
Dim i As Integer
Dim SrcWs As Worksheet
Set SrcWs = Worksheets("Sheet1")

i = 1

If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Autumn"

ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Spring"

ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
And SrcWs.Cells(i, "K").Value <> "" Then
myTerm = "Summer"

End If
End Sub





share|improve this answer




























    up vote
    0
    down vote













    Couple of issues that I could see in your snippet:





    • SrcWs is not declared/instantiated anywhere in your snippet.


    • i is not assigned. If it's being implicitly converted to 0 (when using Cells()), then you're trying to access the zeroth row of the worksheet (which doesn't exist and will give you an error).


    Say you want to assign a value to myTerm based on the values in columns K, M, O and rows 1 to 100 (for example's sake). You could then try something like the below:



    Option Explicit

    Sub ConditionallyAssignMyTerm()
    Dim SrcWs As Worksheet
    Set SrcWs = ThisWorkbook.Worksheets("Sheet1")

    Dim i As Long ' Might be better to rename this to rowIndex or something more descriptive than just i

    With SrcWs
    Dim myTerm As String

    Dim columnKisBlank As Boolean
    Dim columnMisBlank As Boolean
    Dim columnOisBlank As Boolean

    For i = 1 To 100 ' Arbitrary loop values
    columnKisBlank = CellIsBlank(.Cells(i, "K"))
    columnMisBlank = CellIsBlank(.Cells(i, "M"))
    columnOisBlank = CellIsBlank(.Cells(i, "O"))

    If (Not columnKisBlank) And columnMisBlank And columnOisBlank Then
    myTerm = "Autumn"

    ElseIf (Not columnKisBlank) And (Not columnMisBlank) And columnOisBlank Then
    myTerm = "Spring"

    ElseIf (Not columnKisBlank) And (Not columnMisBlank) And (Not columnOisBlank) Then
    myTerm = "Summer"
    End If
    Next i

    End With
    End Sub

    Function CellIsBlank(ByRef cellToCheck As Range) As Boolean
    CellIsBlank = VBA.IsEmpty(cellToCheck.Value2) Or (Len(cellToCheck.Value2) = 0)
    End Function





    share|improve this answer





















      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431672%2fsetting-the-string-value-of-myterm-based-on-various-cell-content-combinations%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      This works fine. I do not see a problem with your if statement.



      Option Explicit

      Sub FilterProgressData()
      Dim myTerm As String
      Dim i As Integer
      Dim SrcWs As Worksheet
      Set SrcWs = Worksheets("Sheet1")

      i = 1

      If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
      SrcWs.Cells(i, "K").Value <> "" Then
      myTerm = "Autumn"

      ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
      And SrcWs.Cells(i, "K").Value <> "" Then
      myTerm = "Spring"

      ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
      And SrcWs.Cells(i, "K").Value <> "" Then
      myTerm = "Summer"

      End If
      End Sub





      share|improve this answer

























        up vote
        0
        down vote













        This works fine. I do not see a problem with your if statement.



        Option Explicit

        Sub FilterProgressData()
        Dim myTerm As String
        Dim i As Integer
        Dim SrcWs As Worksheet
        Set SrcWs = Worksheets("Sheet1")

        i = 1

        If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
        SrcWs.Cells(i, "K").Value <> "" Then
        myTerm = "Autumn"

        ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
        And SrcWs.Cells(i, "K").Value <> "" Then
        myTerm = "Spring"

        ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
        And SrcWs.Cells(i, "K").Value <> "" Then
        myTerm = "Summer"

        End If
        End Sub





        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          This works fine. I do not see a problem with your if statement.



          Option Explicit

          Sub FilterProgressData()
          Dim myTerm As String
          Dim i As Integer
          Dim SrcWs As Worksheet
          Set SrcWs = Worksheets("Sheet1")

          i = 1

          If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
          SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Autumn"

          ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
          And SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Spring"

          ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
          And SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Summer"

          End If
          End Sub





          share|improve this answer












          This works fine. I do not see a problem with your if statement.



          Option Explicit

          Sub FilterProgressData()
          Dim myTerm As String
          Dim i As Integer
          Dim SrcWs As Worksheet
          Set SrcWs = Worksheets("Sheet1")

          i = 1

          If SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value = "" And _
          SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Autumn"

          ElseIf SrcWs.Cells(i, "O").Value = "" And SrcWs.Cells(i, "M").Value <> "" _
          And SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Spring"

          ElseIf SrcWs.Cells(i, "O").Value <> "" And SrcWs.Cells(i, "M").Value <> "" _
          And SrcWs.Cells(i, "K").Value <> "" Then
          myTerm = "Summer"

          End If
          End Sub






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 13:31









          Anthony

          177110




          177110
























              up vote
              0
              down vote













              Couple of issues that I could see in your snippet:





              • SrcWs is not declared/instantiated anywhere in your snippet.


              • i is not assigned. If it's being implicitly converted to 0 (when using Cells()), then you're trying to access the zeroth row of the worksheet (which doesn't exist and will give you an error).


              Say you want to assign a value to myTerm based on the values in columns K, M, O and rows 1 to 100 (for example's sake). You could then try something like the below:



              Option Explicit

              Sub ConditionallyAssignMyTerm()
              Dim SrcWs As Worksheet
              Set SrcWs = ThisWorkbook.Worksheets("Sheet1")

              Dim i As Long ' Might be better to rename this to rowIndex or something more descriptive than just i

              With SrcWs
              Dim myTerm As String

              Dim columnKisBlank As Boolean
              Dim columnMisBlank As Boolean
              Dim columnOisBlank As Boolean

              For i = 1 To 100 ' Arbitrary loop values
              columnKisBlank = CellIsBlank(.Cells(i, "K"))
              columnMisBlank = CellIsBlank(.Cells(i, "M"))
              columnOisBlank = CellIsBlank(.Cells(i, "O"))

              If (Not columnKisBlank) And columnMisBlank And columnOisBlank Then
              myTerm = "Autumn"

              ElseIf (Not columnKisBlank) And (Not columnMisBlank) And columnOisBlank Then
              myTerm = "Spring"

              ElseIf (Not columnKisBlank) And (Not columnMisBlank) And (Not columnOisBlank) Then
              myTerm = "Summer"
              End If
              Next i

              End With
              End Sub

              Function CellIsBlank(ByRef cellToCheck As Range) As Boolean
              CellIsBlank = VBA.IsEmpty(cellToCheck.Value2) Or (Len(cellToCheck.Value2) = 0)
              End Function





              share|improve this answer

























                up vote
                0
                down vote













                Couple of issues that I could see in your snippet:





                • SrcWs is not declared/instantiated anywhere in your snippet.


                • i is not assigned. If it's being implicitly converted to 0 (when using Cells()), then you're trying to access the zeroth row of the worksheet (which doesn't exist and will give you an error).


                Say you want to assign a value to myTerm based on the values in columns K, M, O and rows 1 to 100 (for example's sake). You could then try something like the below:



                Option Explicit

                Sub ConditionallyAssignMyTerm()
                Dim SrcWs As Worksheet
                Set SrcWs = ThisWorkbook.Worksheets("Sheet1")

                Dim i As Long ' Might be better to rename this to rowIndex or something more descriptive than just i

                With SrcWs
                Dim myTerm As String

                Dim columnKisBlank As Boolean
                Dim columnMisBlank As Boolean
                Dim columnOisBlank As Boolean

                For i = 1 To 100 ' Arbitrary loop values
                columnKisBlank = CellIsBlank(.Cells(i, "K"))
                columnMisBlank = CellIsBlank(.Cells(i, "M"))
                columnOisBlank = CellIsBlank(.Cells(i, "O"))

                If (Not columnKisBlank) And columnMisBlank And columnOisBlank Then
                myTerm = "Autumn"

                ElseIf (Not columnKisBlank) And (Not columnMisBlank) And columnOisBlank Then
                myTerm = "Spring"

                ElseIf (Not columnKisBlank) And (Not columnMisBlank) And (Not columnOisBlank) Then
                myTerm = "Summer"
                End If
                Next i

                End With
                End Sub

                Function CellIsBlank(ByRef cellToCheck As Range) As Boolean
                CellIsBlank = VBA.IsEmpty(cellToCheck.Value2) Or (Len(cellToCheck.Value2) = 0)
                End Function





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Couple of issues that I could see in your snippet:





                  • SrcWs is not declared/instantiated anywhere in your snippet.


                  • i is not assigned. If it's being implicitly converted to 0 (when using Cells()), then you're trying to access the zeroth row of the worksheet (which doesn't exist and will give you an error).


                  Say you want to assign a value to myTerm based on the values in columns K, M, O and rows 1 to 100 (for example's sake). You could then try something like the below:



                  Option Explicit

                  Sub ConditionallyAssignMyTerm()
                  Dim SrcWs As Worksheet
                  Set SrcWs = ThisWorkbook.Worksheets("Sheet1")

                  Dim i As Long ' Might be better to rename this to rowIndex or something more descriptive than just i

                  With SrcWs
                  Dim myTerm As String

                  Dim columnKisBlank As Boolean
                  Dim columnMisBlank As Boolean
                  Dim columnOisBlank As Boolean

                  For i = 1 To 100 ' Arbitrary loop values
                  columnKisBlank = CellIsBlank(.Cells(i, "K"))
                  columnMisBlank = CellIsBlank(.Cells(i, "M"))
                  columnOisBlank = CellIsBlank(.Cells(i, "O"))

                  If (Not columnKisBlank) And columnMisBlank And columnOisBlank Then
                  myTerm = "Autumn"

                  ElseIf (Not columnKisBlank) And (Not columnMisBlank) And columnOisBlank Then
                  myTerm = "Spring"

                  ElseIf (Not columnKisBlank) And (Not columnMisBlank) And (Not columnOisBlank) Then
                  myTerm = "Summer"
                  End If
                  Next i

                  End With
                  End Sub

                  Function CellIsBlank(ByRef cellToCheck As Range) As Boolean
                  CellIsBlank = VBA.IsEmpty(cellToCheck.Value2) Or (Len(cellToCheck.Value2) = 0)
                  End Function





                  share|improve this answer












                  Couple of issues that I could see in your snippet:





                  • SrcWs is not declared/instantiated anywhere in your snippet.


                  • i is not assigned. If it's being implicitly converted to 0 (when using Cells()), then you're trying to access the zeroth row of the worksheet (which doesn't exist and will give you an error).


                  Say you want to assign a value to myTerm based on the values in columns K, M, O and rows 1 to 100 (for example's sake). You could then try something like the below:



                  Option Explicit

                  Sub ConditionallyAssignMyTerm()
                  Dim SrcWs As Worksheet
                  Set SrcWs = ThisWorkbook.Worksheets("Sheet1")

                  Dim i As Long ' Might be better to rename this to rowIndex or something more descriptive than just i

                  With SrcWs
                  Dim myTerm As String

                  Dim columnKisBlank As Boolean
                  Dim columnMisBlank As Boolean
                  Dim columnOisBlank As Boolean

                  For i = 1 To 100 ' Arbitrary loop values
                  columnKisBlank = CellIsBlank(.Cells(i, "K"))
                  columnMisBlank = CellIsBlank(.Cells(i, "M"))
                  columnOisBlank = CellIsBlank(.Cells(i, "O"))

                  If (Not columnKisBlank) And columnMisBlank And columnOisBlank Then
                  myTerm = "Autumn"

                  ElseIf (Not columnKisBlank) And (Not columnMisBlank) And columnOisBlank Then
                  myTerm = "Spring"

                  ElseIf (Not columnKisBlank) And (Not columnMisBlank) And (Not columnOisBlank) Then
                  myTerm = "Summer"
                  End If
                  Next i

                  End With
                  End Sub

                  Function CellIsBlank(ByRef cellToCheck As Range) As Boolean
                  CellIsBlank = VBA.IsEmpty(cellToCheck.Value2) Or (Len(cellToCheck.Value2) = 0)
                  End Function






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 22 at 13:36









                  chillin

                  874134




                  874134






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431672%2fsetting-the-string-value-of-myterm-based-on-various-cell-content-combinations%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      What visual should I use to simply compare current year value vs last year in Power BI desktop

                      How to ignore python UserWarning in pytest?

                      Alexandru Averescu