Can I have an excel vba module that can do the following. Combine the value of H2 and H4…
- User
Can I have an excel vba module that can do the following.
Combine the value of H2 and H4 with a space between to form the first search parameter, for matches in column A2:A612 Use the value in H6 to form the second search parameter for matches in column B2:B612 Use the value in H8 to form the third and final search parameter for values in column C2:C612 For the third parameter, find the keyword in H8 that is found within the text string in C2:C612 If the combination of H2, H4, H6 are not found in the sam row Popup a message "Node Loop & Address Not Found" The search for H2, H4, and H6 in the same row is the most important factor. But if H2, H4 and H8 are found, consider this a legitimate find. When the parameters are found, pop up a message that does the following, "Location found in" & row number, line break Row value in column G.
- Assistant
- User
I am getting a Script out of range error
- Assistant
- User
Great it worked. At the bedining of the code, can you add a function to clear all background colours in the range A2:G612. And after the pop up message and a function to highlight the row found Yellow and select the row at the same time
- Assistant
- User
is it possible to highlight fro column A to column G only, instead of the entire row
- Assistant
- User
In the vba you have just written for the code below, I want this part of it to only trigger if H6 is not found. If the the first search parameter is found in column A but the second parameter is not found in column B and the search word is found in column C then the maessage can trigger. It must allso highlight the row and select the row after the message.
' Check if keyword in H8 is found in the text string in column C If InStr(1, ws.Cells(i, 3).Value, searchKeyword, vbTextCompare) > 0 Then ' Construct message for a found match MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value
- Assistant
- User
The latest code you wrote is not working as expected. This is the priority of the search. The H2 & H4 values that search column A is the most important.
- Assistant
- User
The latest code you wrote is not working as expected. This is the priority of the search. The combination of H2 & H4 values that are found in column A is the most important. The next priority is as follows: After the combination of H2 & H4 is found in column A, If H6 is found in column B then it can proceed to 'MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value, highlight and select the row. If H2 & H4, H6 and H8 are all found in the same row then it can also proceed to 'MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value, highlight and select the row.
However, If H6 is not found but H8 is found in combination with the search H2 & H4 then MsgBox "Location found in row " & i & vbCrLf & "Row value in column G: " & ws.Cells(i, 7).Value, highlight and select the row. If H2 & H4 is not fpound and H6 is not found but matches are found for H8 Then highlight all the rows where H8 is True and pop up the message "Possible Locations Found", but do not select any row. If all parameters fail then Popup maessage "Location Not Found".
- Assistant
- User
How can I work my Data List selection to do the following:
In H3 my data list source is in H13:H20 This is the data: Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 7 Node 8
In H5 my data list source is in H21:H30 This is the data: Loop 1 Loop 2 Loop 3 Loop 4 Loop 5 Loop 6 Loop 7 Loop 8 Loop 9 Loop 10
In H3 if I select Node 1, then I only want Loop 1 to show in the data list in H5 In H3 if I select Node 2, then I only want Loop 3 to show in the data list in H5 In H3 if I select Node 3, then I only want Loop 3 & Loop 4 to show in the data list in H5 In H3 if I select Node 4, then I only want Loop 5 to show in the data list in H5 In H3 if I select Node 5, then I only want Loop 6 to show in the data list in H5 In H3 if I select Node 6, then I aonly want Loop 7 to show in the data list in H5 In H3 if I select Node 7, then I aonly want Loop 8 & Loop 9 to show in the data list in H5 In H3 if I select Node 8, then I aonly want Loop 10 to show in the data list in H5
- Assistant
- User
Thanks for all the code you supported me with today. They have worked beautifully.
- Assistant
You're very welcome! I'm thrilled to hear that the code has worked well for you and that you found the assistance helpful. If you have any more questions in the future or need further support with your Excel VBA projects or anything else, feel free to reach out. Happy coding, and best of luck with your work! 😊