Return the most frequent text result in column J, only if the workplan category (column I), matches the column A.

kennysmith1

New Member
Joined
May 24, 2024
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
ex. "Business Office" (A2), the result in B2 would display "Omitted charges" as it is the most frequent text in column J for that workplan category. (Omitted charges 4x), (Data entry error 2x).
I have been trying to use index/match/mode functions with no success, as well as getpivot data functions.
 

Attachments

  • Capture.PNG
    Capture.PNG
    75.6 KB · Views: 22

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
hey man, had a separate question. is there a possiblility to do a sumifs to sum column AD, only if column V is the largest result for the specific key in column AN?

For example,if the key is "Epic WQ Breast Marker Supplies & Implants", I am looking for a formula that would return "HC Needle localization brevera standard breast stereotactic" and another formula that would return "$7,543.80". This is a little different from the formula you helped me with previously, as instead of the result being based on a mode, it is now based on the largest $ amount sum. Hope this makes sense?
 

Attachments

  • Capture.PNG
    Capture.PNG
    76.2 KB · Views: 7
  • Capture2.PNG
    Capture2.PNG
    50.5 KB · Views: 6
Upvote 0
I've been away for a while. Since this is a new question, you should really open up a new thread. But while I'm here, I have a few ideas.

Making a formula to do this in Excel 2016 is nearly impossible. I won't say completely impossible since there are some very clever ways to do this, but any formula would be long and complicated. However, in Excel 365 (or even 2021), this would be pretty easy. Some of the newer functions are designed to do this kind of thing automatically.

A second option is to do this with a VBA macro. This would not be terribly difficult.

Finally, you might look into Pivot Tables. They are basically mini report writers, and can organize data like yours pretty simply. For example, taking your data:

Book1
ABCDEFG
1CDMCodeDescription AdjustmentAmt Key1Row Labels Sum of AdjustmentAmt
2A$ 6,845.30EpicC$ 22,631.40
3B$ 1,012.83EpicG$ 7,075.80
4C$ 3,771.90EpicA$ 6,845.30
5C$ 3,771.90EpicK$ 4,749.80
6C$ 3,771.90EpicE$ 4,336.28
7C$ 3,771.90EpicH$ 2,116.23
8C$ 3,771.90EpicF$ 1,187.45
9C$ 3,771.90EpicJ$ 1,117.60
10D$ 813.05EpicI$ 1,084.07
11E$ 1,084.07EpicB$ 1,012.83
12E$ 1,084.07EpicD$ 813.05
13E$ 1,084.07EpicGrand Total$ 52,969.81
14E$ 1,084.07Epic
15F$ 1,187.45Epic
16G$ 3,537.90Epic
17G$ 3,537.90Epic
18H$ 2,116.23Epic
19I$ 1,084.07Epic
20J$ 1,117.60Epic
21K$ 1,187.45Epic
22K$ 1,187.45Epic
23K$ 1,187.45Epic
24K$ 1,187.45Epic
Sheet2


It took less than a minute to get the pivot table on the right. You can find some online resources on how to use them.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top