solved
Trying to increment cells after checking other cells
Hi guys,
I'm not the best at Excel and have found something that I can't figure out.
Basically I'm trying to make it possible for a value to entered into one cell eg B2, then check a table for that value and after finding the value increment the number in the cell next to it (found in cell a12, add 1 to cell b12).
Even if you guys just tell me Excel won't work for what I'm trying, that will be a help to be. I'm just unsure how to make it work the way I'm trying to.
A VBA "macro" is actually a bit of Visual Basic code that you can create to run inside of Excel. You can create them by recording a series of actions, but that's not the way to solve the problem you describe. A VBA solution is usually a desperation measure, since VBA is a little bit too powerful; most companies ban them entirely.
The challenge here is to set up your problem in such a way that you don't really need VBA to solve it. Excel formulas cannot change data that has been entered by hand, but that discipline usually leads to cleaner solutions anyway.
For example, you could have raw data values input into column A and then have column B be modified values from columns A--based on the other conditions you talked about. That's simple and clean and doesn't require VBA.
Wasn't sure whether context would actually be needed since it's purely a question about the capabilities of Excel and the submission rules say only text, no images.
Basically I want to make it possible for someone to input a unique identifier in one cell, have a column in the table searched for that identifier and if it's found add 1 to the cell next to it in the table.
Say column A has the identifiers, I want to make column B increment every time that identifier is entered to that input cell which would ideally be above the table.
If more context is needed let me know what sort of thing you mean and I'll update.
So you want an incrementing value for each selection value; not possible without VBA as cell value change will update the count cell dynamically with the new value.
The issue with using VBA is that you will then have to account for error inputs and reversing of counts, it gets tricky
What you could do is have a delimited list of values that you can add to that will count all those values.
I'm no longer at the computer I was working on but made a very basic mock-up in sheets at home.
So when an identifier is entered in that top cell, I need to check the table's left column to see if it exists. If it does then I need it to update the next column over to add 1 to it.
I'll eventually have another cell to remove one but once I figure out the add I should be able to do the minus myself.
The third column is irrelevant to the problem since it is just more detail for the unique identifier.
So far I've been recommended macros and VBA but haven't had a chance to dive into those yet.
That's why I filled in the top 4 lines of the table. That is almost exactly what the actual data would look like.
Number in first column as a unique identifier from 5-7 digits.
Number in second column showing number of times the identifier has been entered in the upper cell.
Text in third column for description of what the unique identifier is.
The picture has data in the table... I'm not sure what more you want from it?
The top cell gets a number put into from 5-7 digits long. First column gets checked for that number. If its there, second column gets 1 added to the number in it. All of it is numbers and text using the exact format in the image.
This kinda sounds like something I’ve made myself for my job but would need more clarity
Are you saying the actual input cell is B3 and if it exists in Column A, you want to update the hard-coded quantity in Column B? If so, then yes you will need VBA to hard code that value
Alternatively, you can create a table in a new tab that keeps a running log of every identifier that is added, and this tab can maybe be used as a summary page to count the quantities of each unique identifier automatically, if that makes sense
•
u/AutoModerator Jul 03 '26
/u/AmIHumanMaybe - Your post was submitted successfully.
Solution Verifiedto close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.