Find a value within a column, then change a value elsewhere on the same row











up vote
1
down vote

favorite












I am currently working on a project that has me working with an Excel "database".
It is going to be used to keep track of production of certain items and every now and then, human mistakes can happen and there have been cases of people scanning the same item more than once, which later on causes problems when it's time to pack it up and send to the client.



I managed to have an alert popup, to prevent people from scanning the same item more than once unless they're dealing with a rework.



My main issue right now, is to figure out how to change the value of a cell, whenever there is a dupe or that item is being reworked.



If the item is scanned and it's already present in the "database", there is a MsgBox with vbYesNo buttons. If people click "Yes", it's a rework. If people click "No", it's an error and they exit the sub.



I need to come up with a way to handle the rework and have it change the values of the cells in the same row as the original item.



Can anyone help me or point me in the right direction? I've read some similar questions on this topic here, but so far none had a clear answer.



Here's the code I have so far.



Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value

Set depo = dbgrids.Sheets("Deposition")
Set found = depo.Columns("A").Find(what:=valuetofind, LookIn:=xlValues, lookat:=xlWhole)

valuetofind = gbatchd.Text
FR = depo.Range("A" & Rows.Count).End(xlUp).Row

If KeyCode = 13 Then
For i = 1 To FR
If gbatch.Cells(i, 1).Value = valuetofind Then
MsgBox "This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?"
If answer = vbNo Then
Exit Sub
Else
depo.Cells(found.Row, 5).Value = "Rework"
End If
End If
Next
End If
End Sub









share|improve this question
























  • There doesn't seem to be a specific question in there. What does "reworking" actually involve?
    – SJR
    Nov 9 at 18:26










  • @SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
    – Barbaaz
    Nov 9 at 18:42








  • 1




    Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
    – Comintern
    Nov 9 at 18:47










  • @Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
    – Barbaaz
    Nov 9 at 19:07










  • The excel file is on the network for more users, or just on one computer for one user?
    – dee
    Nov 9 at 22:24















up vote
1
down vote

favorite












I am currently working on a project that has me working with an Excel "database".
It is going to be used to keep track of production of certain items and every now and then, human mistakes can happen and there have been cases of people scanning the same item more than once, which later on causes problems when it's time to pack it up and send to the client.



I managed to have an alert popup, to prevent people from scanning the same item more than once unless they're dealing with a rework.



My main issue right now, is to figure out how to change the value of a cell, whenever there is a dupe or that item is being reworked.



If the item is scanned and it's already present in the "database", there is a MsgBox with vbYesNo buttons. If people click "Yes", it's a rework. If people click "No", it's an error and they exit the sub.



I need to come up with a way to handle the rework and have it change the values of the cells in the same row as the original item.



Can anyone help me or point me in the right direction? I've read some similar questions on this topic here, but so far none had a clear answer.



Here's the code I have so far.



Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value

Set depo = dbgrids.Sheets("Deposition")
Set found = depo.Columns("A").Find(what:=valuetofind, LookIn:=xlValues, lookat:=xlWhole)

valuetofind = gbatchd.Text
FR = depo.Range("A" & Rows.Count).End(xlUp).Row

If KeyCode = 13 Then
For i = 1 To FR
If gbatch.Cells(i, 1).Value = valuetofind Then
MsgBox "This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?"
If answer = vbNo Then
Exit Sub
Else
depo.Cells(found.Row, 5).Value = "Rework"
End If
End If
Next
End If
End Sub









share|improve this question
























  • There doesn't seem to be a specific question in there. What does "reworking" actually involve?
    – SJR
    Nov 9 at 18:26










  • @SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
    – Barbaaz
    Nov 9 at 18:42








  • 1




    Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
    – Comintern
    Nov 9 at 18:47










  • @Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
    – Barbaaz
    Nov 9 at 19:07










  • The excel file is on the network for more users, or just on one computer for one user?
    – dee
    Nov 9 at 22:24













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am currently working on a project that has me working with an Excel "database".
It is going to be used to keep track of production of certain items and every now and then, human mistakes can happen and there have been cases of people scanning the same item more than once, which later on causes problems when it's time to pack it up and send to the client.



I managed to have an alert popup, to prevent people from scanning the same item more than once unless they're dealing with a rework.



My main issue right now, is to figure out how to change the value of a cell, whenever there is a dupe or that item is being reworked.



If the item is scanned and it's already present in the "database", there is a MsgBox with vbYesNo buttons. If people click "Yes", it's a rework. If people click "No", it's an error and they exit the sub.



I need to come up with a way to handle the rework and have it change the values of the cells in the same row as the original item.



Can anyone help me or point me in the right direction? I've read some similar questions on this topic here, but so far none had a clear answer.



Here's the code I have so far.



Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value

Set depo = dbgrids.Sheets("Deposition")
Set found = depo.Columns("A").Find(what:=valuetofind, LookIn:=xlValues, lookat:=xlWhole)

valuetofind = gbatchd.Text
FR = depo.Range("A" & Rows.Count).End(xlUp).Row

If KeyCode = 13 Then
For i = 1 To FR
If gbatch.Cells(i, 1).Value = valuetofind Then
MsgBox "This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?"
If answer = vbNo Then
Exit Sub
Else
depo.Cells(found.Row, 5).Value = "Rework"
End If
End If
Next
End If
End Sub









share|improve this question















I am currently working on a project that has me working with an Excel "database".
It is going to be used to keep track of production of certain items and every now and then, human mistakes can happen and there have been cases of people scanning the same item more than once, which later on causes problems when it's time to pack it up and send to the client.



I managed to have an alert popup, to prevent people from scanning the same item more than once unless they're dealing with a rework.



My main issue right now, is to figure out how to change the value of a cell, whenever there is a dupe or that item is being reworked.



If the item is scanned and it's already present in the "database", there is a MsgBox with vbYesNo buttons. If people click "Yes", it's a rework. If people click "No", it's an error and they exit the sub.



I need to come up with a way to handle the rework and have it change the values of the cells in the same row as the original item.



Can anyone help me or point me in the right direction? I've read some similar questions on this topic here, but so far none had a clear answer.



Here's the code I have so far.



Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value

Set depo = dbgrids.Sheets("Deposition")
Set found = depo.Columns("A").Find(what:=valuetofind, LookIn:=xlValues, lookat:=xlWhole)

valuetofind = gbatchd.Text
FR = depo.Range("A" & Rows.Count).End(xlUp).Row

If KeyCode = 13 Then
For i = 1 To FR
If gbatch.Cells(i, 1).Value = valuetofind Then
MsgBox "This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?"
If answer = vbNo Then
Exit Sub
Else
depo.Cells(found.Row, 5).Value = "Rework"
End If
End If
Next
End If
End Sub






excel vba excel-vba excel-2010






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 15:58









Excelosaurus

1,9651714




1,9651714










asked Nov 9 at 17:30









Barbaaz

587




587












  • There doesn't seem to be a specific question in there. What does "reworking" actually involve?
    – SJR
    Nov 9 at 18:26










  • @SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
    – Barbaaz
    Nov 9 at 18:42








  • 1




    Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
    – Comintern
    Nov 9 at 18:47










  • @Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
    – Barbaaz
    Nov 9 at 19:07










  • The excel file is on the network for more users, or just on one computer for one user?
    – dee
    Nov 9 at 22:24


















  • There doesn't seem to be a specific question in there. What does "reworking" actually involve?
    – SJR
    Nov 9 at 18:26










  • @SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
    – Barbaaz
    Nov 9 at 18:42








  • 1




    Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
    – Comintern
    Nov 9 at 18:47










  • @Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
    – Barbaaz
    Nov 9 at 19:07










  • The excel file is on the network for more users, or just on one computer for one user?
    – dee
    Nov 9 at 22:24
















There doesn't seem to be a specific question in there. What does "reworking" actually involve?
– SJR
Nov 9 at 18:26




There doesn't seem to be a specific question in there. What does "reworking" actually involve?
– SJR
Nov 9 at 18:26












@SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
– Barbaaz
Nov 9 at 18:42






@SJR reworking involves rejecting some more items than initially, the item is being reworked because there was something wrong with it during screening. So everytime the item is reworked, the amount of a certain substance is lowered and all of that has to be traceable. I guess I could create a new row with that information and then merge it with the original row. But I think that will be a little more complicated.
– Barbaaz
Nov 9 at 18:42






1




1




Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
– Comintern
Nov 9 at 18:47




Is there a reason you can't use an actual database? Trying to enforce referential integrity is a little more than "complicated".
– Comintern
Nov 9 at 18:47












@Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
– Barbaaz
Nov 9 at 19:07




@Cominter I work for a company with very strict security policies. And since I'm fairly new in the company, they want me to work with what I have which is Excel.
– Barbaaz
Nov 9 at 19:07












The excel file is on the network for more users, or just on one computer for one user?
– dee
Nov 9 at 22:24




The excel file is on the network for more users, or just on one computer for one user?
– dee
Nov 9 at 22:24












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Setting aside any criticism of the solution's architecture, what your code is missing is the assignment to the answer variable:



answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")


Use Option Explicit and declare your variables with the appropriate types (check out this article).



A cleaned-up version of your code might look something like this:



Option Explicit 'At the very top of your module.

'... Other code ...

Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value
Dim wsDepo As Excel.Worksheet
Dim rngFound As Excel.Range
Dim sValueToFind As String
Dim answer As VbMsgBoxResult

If KeyCode = KeyCodeConstants.vbKeyReturn Then
'Barcode reader has sent the Enter (Return) key.
'Attempt to find the value.
sValueToFind = Trim(gbatchd.Text)
Set wsDepo = dbgrids.Worksheets("Deposition")
Set rngFound = wsDepo.Columns(1).Find(What:=sValueToFind, LookIn:=xlValues, LookAt:=xlWhole)

If Not rngFound Is Nothing Then
'Value was found. Ask whether it is a rework.
answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")
If answer = VbMsgBoxResult.vbYes Then
wsDepo.Cells(rngFound.Row, 5).Value = "Rework"
End If
End If

'Cleanup.
Set rngFound = Nothing
Set wsDepo = Nothing
End If
End Sub





share|improve this answer























  • Excellent... ;-)
    – johey
    Nov 10 at 16:02










  • @Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
    – Barbaaz
    Nov 11 at 23:54










  • @Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
    – Barbaaz
    Nov 12 at 10:03










  • @Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
    – Barbaaz
    Nov 12 at 11:14











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%2f53230656%2ffind-a-value-within-a-column-then-change-a-value-elsewhere-on-the-same-row%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Setting aside any criticism of the solution's architecture, what your code is missing is the assignment to the answer variable:



answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")


Use Option Explicit and declare your variables with the appropriate types (check out this article).



A cleaned-up version of your code might look something like this:



Option Explicit 'At the very top of your module.

'... Other code ...

Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value
Dim wsDepo As Excel.Worksheet
Dim rngFound As Excel.Range
Dim sValueToFind As String
Dim answer As VbMsgBoxResult

If KeyCode = KeyCodeConstants.vbKeyReturn Then
'Barcode reader has sent the Enter (Return) key.
'Attempt to find the value.
sValueToFind = Trim(gbatchd.Text)
Set wsDepo = dbgrids.Worksheets("Deposition")
Set rngFound = wsDepo.Columns(1).Find(What:=sValueToFind, LookIn:=xlValues, LookAt:=xlWhole)

If Not rngFound Is Nothing Then
'Value was found. Ask whether it is a rework.
answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")
If answer = VbMsgBoxResult.vbYes Then
wsDepo.Cells(rngFound.Row, 5).Value = "Rework"
End If
End If

'Cleanup.
Set rngFound = Nothing
Set wsDepo = Nothing
End If
End Sub





share|improve this answer























  • Excellent... ;-)
    – johey
    Nov 10 at 16:02










  • @Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
    – Barbaaz
    Nov 11 at 23:54










  • @Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
    – Barbaaz
    Nov 12 at 10:03










  • @Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
    – Barbaaz
    Nov 12 at 11:14















up vote
1
down vote



accepted










Setting aside any criticism of the solution's architecture, what your code is missing is the assignment to the answer variable:



answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")


Use Option Explicit and declare your variables with the appropriate types (check out this article).



A cleaned-up version of your code might look something like this:



Option Explicit 'At the very top of your module.

'... Other code ...

Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value
Dim wsDepo As Excel.Worksheet
Dim rngFound As Excel.Range
Dim sValueToFind As String
Dim answer As VbMsgBoxResult

If KeyCode = KeyCodeConstants.vbKeyReturn Then
'Barcode reader has sent the Enter (Return) key.
'Attempt to find the value.
sValueToFind = Trim(gbatchd.Text)
Set wsDepo = dbgrids.Worksheets("Deposition")
Set rngFound = wsDepo.Columns(1).Find(What:=sValueToFind, LookIn:=xlValues, LookAt:=xlWhole)

If Not rngFound Is Nothing Then
'Value was found. Ask whether it is a rework.
answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")
If answer = VbMsgBoxResult.vbYes Then
wsDepo.Cells(rngFound.Row, 5).Value = "Rework"
End If
End If

'Cleanup.
Set rngFound = Nothing
Set wsDepo = Nothing
End If
End Sub





share|improve this answer























  • Excellent... ;-)
    – johey
    Nov 10 at 16:02










  • @Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
    – Barbaaz
    Nov 11 at 23:54










  • @Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
    – Barbaaz
    Nov 12 at 10:03










  • @Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
    – Barbaaz
    Nov 12 at 11:14













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Setting aside any criticism of the solution's architecture, what your code is missing is the assignment to the answer variable:



answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")


Use Option Explicit and declare your variables with the appropriate types (check out this article).



A cleaned-up version of your code might look something like this:



Option Explicit 'At the very top of your module.

'... Other code ...

Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value
Dim wsDepo As Excel.Worksheet
Dim rngFound As Excel.Range
Dim sValueToFind As String
Dim answer As VbMsgBoxResult

If KeyCode = KeyCodeConstants.vbKeyReturn Then
'Barcode reader has sent the Enter (Return) key.
'Attempt to find the value.
sValueToFind = Trim(gbatchd.Text)
Set wsDepo = dbgrids.Worksheets("Deposition")
Set rngFound = wsDepo.Columns(1).Find(What:=sValueToFind, LookIn:=xlValues, LookAt:=xlWhole)

If Not rngFound Is Nothing Then
'Value was found. Ask whether it is a rework.
answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")
If answer = VbMsgBoxResult.vbYes Then
wsDepo.Cells(rngFound.Row, 5).Value = "Rework"
End If
End If

'Cleanup.
Set rngFound = Nothing
Set wsDepo = Nothing
End If
End Sub





share|improve this answer














Setting aside any criticism of the solution's architecture, what your code is missing is the assignment to the answer variable:



answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")


Use Option Explicit and declare your variables with the appropriate types (check out this article).



A cleaned-up version of your code might look something like this:



Option Explicit 'At the very top of your module.

'... Other code ...

Private Sub gbatchd_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) 'Check DB for duplicate value
Dim wsDepo As Excel.Worksheet
Dim rngFound As Excel.Range
Dim sValueToFind As String
Dim answer As VbMsgBoxResult

If KeyCode = KeyCodeConstants.vbKeyReturn Then
'Barcode reader has sent the Enter (Return) key.
'Attempt to find the value.
sValueToFind = Trim(gbatchd.Text)
Set wsDepo = dbgrids.Worksheets("Deposition")
Set rngFound = wsDepo.Columns(1).Find(What:=sValueToFind, LookIn:=xlValues, LookAt:=xlWhole)

If Not rngFound Is Nothing Then
'Value was found. Ask whether it is a rework.
answer = MsgBox("This batch has already been deposited!" & vbCrLf & "Rework?", vbYesNo, "Rework?")
If answer = VbMsgBoxResult.vbYes Then
wsDepo.Cells(rngFound.Row, 5).Value = "Rework"
End If
End If

'Cleanup.
Set rngFound = Nothing
Set wsDepo = Nothing
End If
End Sub






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 12 at 2:19

























answered Nov 10 at 5:59









Excelosaurus

1,9651714




1,9651714












  • Excellent... ;-)
    – johey
    Nov 10 at 16:02










  • @Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
    – Barbaaz
    Nov 11 at 23:54










  • @Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
    – Barbaaz
    Nov 12 at 10:03










  • @Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
    – Barbaaz
    Nov 12 at 11:14


















  • Excellent... ;-)
    – johey
    Nov 10 at 16:02










  • @Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
    – Barbaaz
    Nov 11 at 23:54










  • @Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
    – Barbaaz
    Nov 12 at 10:03










  • @Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
    – Barbaaz
    Nov 12 at 11:14
















Excellent... ;-)
– johey
Nov 10 at 16:02




Excellent... ;-)
– johey
Nov 10 at 16:02












@Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
– Barbaaz
Nov 11 at 23:54




@Excelosaurus I'm sorry for giving you that much work. I declared the variables outside the sub, since they'll be used in other subs as well. But thank you for your answer and your time. I'm going to test this out as soon as I get to work tomorrow.
– Barbaaz
Nov 11 at 23:54












@Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
– Barbaaz
Nov 12 at 10:03




@Excelosaurus I've tried your suggestion, but "Rework" is added in a new row at the very end of the range
– Barbaaz
Nov 12 at 10:03












@Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
– Barbaaz
Nov 12 at 11:14




@Excelosaurus nevermind. Your code worked. I messed up the order of the variables. Thank you for your help.
– Barbaaz
Nov 12 at 11:14


















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%2f53230656%2ffind-a-value-within-a-column-then-change-a-value-elsewhere-on-the-same-row%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

Bressuire

Vorschmack

Quarantine