unsolved
Count how many times a value of a cell is near another
Ok, I'm sure this is incredibly dumb. I set up a sheet probably too close to a physical piece of paper than I should have but it's come such a long way that I don't want any further changes. Basically, what I need to do is find how many times a value in a cell heading is near a certain number in another sheet.
For example, let's say the heading is called "Equipment", and I would like to know how many times the number 8 is 2 columns left and 1 row down from it, in the next sheet.
Can either an offset or xlookup do something like that?
Agreed. Yes, it takes an annoying amount of time and effort to completely rearrange a workbook. And when that results in something that's easier and more efficient to use and less prone to error, it's worth every bit of the time and effort spent. I've done that in the last few years with several large and complicated files that I rely on, and it's now so much easier to enter data, generate new kinds of reports when they're needed, and teach other people to use them.
In addition to what others have suggested, Sometimes a ‘helper’ column aids in setting this up.
Have an extra helper column that uses an IF statement and have it return either a ‘YES’ or a ‘NO’ if the row meets a certain criteria in relation to other cells. This can later make it easier to sum things up using a pivot table or other formulas. It really depends on what exactly you are trying to accomplish.
Okay im not sure if this is what youre looking for, but could you use something simple like COUNTIFS($C$1:$C$1000,"Equipment",$A$3:$A$1002,8)? You'd change the range based on which columns/rows youre looking at. Basically you're offsetting the range of your countifs criteria based on the spacing.
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution. [Thread #49681 for this sub, first seen 13th Nov 2026, 20:28][FAQ][Full list]^[Contact][Source code]
Here is a neat way to organize and count all of the cities at once, as long as your data looks exactly like what is in your sample. Replace `Sheet1` with whatever is the name of the sheet with the data.
The formula is =LET(z,FILTER(DROP(Sheet1!D:.D,1),DROP(Sheet1!F:.F,-1)=C1),GROUPBY(z,z,COUNTA))
It should result in the image you see above given data that appears as you have shown. If you don't want the total, or you want to order the cities by highest number to lowest, it's just a matter of playing with the optional arguments of the GROUPBY function.
•
u/AutoModerator 20d ago
/u/howradisit - Your post was submitted successfully.
Once your problem is solved, reply to the answer(s) saying
Solution Verifiedto close the thread.Follow the submission rules -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post.
Include your Excel version and all other relevant information
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.