You’re on the right track!
Start by asking about when you raise, what raise size will make it most likely that you will go to the flop heads up. If you’re in an early position, there will be more players left to act, so bet bigger. If you’re in late position facing a bunch of limpers, you’ll need to knock them off their hands, so you’ll need to bet big as well. However, as table size dwindles, or you’re in a late position and the action folds to you, you can use a smaller size.
Now that you’ve chosen your bet size, figure out how many hands you should be opening. The larger the size, the tighter your range should be. For example, if I’m on the button facing five limpers with 100BB, I’ll want to raise about 6-8BB, using a tight range of about 8% of my hands.
Now that we have that figure, how do we decide what hands to include? There are 1326 potential starting hands, and 8% of that is about 105. Obviously I’ll want my strong pocket pairs, and there are six combinations of each, so let’s start building my range with 77+ (8*6 = 48 combos). There are four suited and twelve unsuited combinations of unpaired hole cards. In addition to AK and AQ (all sixteen of each), I’d add ATs, AJs, KQs, QJs, and then A4s and A5s as well. That gets me to 104 total combos. Facing a 30BB 3-bet, I’ll fold A4s and A5s, jam with the top 20-25% of my range - QQ+ and AKs gets me 22 combos - and call the rest.
Now, is this a “good” 8% range? It has a nice blend of moderate-to-strong made hands (the pocket pairs), and moderate-to-strong drawing hands (everything else). Facing reasonably-sized aggression, you have a good sense of what you should fold, call, or raise. The range of hands that you’re willing to open-raise is around 2.5x to 3x the range of hands that you’ll fold to aggression.
The size of the range in this situation is probably good, too. Keep in mind that in the post that kicked off this thread, you mentioned JJ as being a hand you might expect a “later position” player to limp. You can’t go too much wider here without exposing yourself to your opponents’ ranges - already four of the “made” hands in your range, 77-TT, are in rough shape against a player with pocket jacks, though most of your “drawing” hands have decent equity against them.
If I were to modify this range by adding weaker hands like 87s, I should balance that by removing a similar number of the weaker hands in the range, like A5s. We also see that we can’t go too crazy modifying this range. Adding a single offsuit hand like KQo will account for 12 new combinations, unless heavily restricted (e.g. a rule that KQ with only black cards are in my open range, but KQo with a diamond or heart will be folded, would add just two combos). Also, we can’t add many more pocket pairs without dropping the strong broadway hands that have good equity against the moderately strong pocket pairs that could be in our competitors’ ranges.
I’ve assumed above that you won’t have a limping range in this spot. If you want to define a limping range, keep in mind that it will be “capped.” You won’t have any of the hands that you would be raising, so anyone who has a fairly strong hand behind you can exploit that. Alternatively, you could remove them from the raising range, but that means you won’t be getting value from those very strong hands, which will probably not maximize your expected value.
Let’s assume that everyone before you folded. How many hands are in your open range, and how many are in your limp range?
Open: JJ+, AJs, KJs, AKo
That’s 16 “made” strong hands, and 20 “unmade” moderately-strong hands, for a total of just 36 combos, or 2.7%. This seems really small, not to mention unbalanced between “made” and “unmade” hands, with no strong unmade hands like AKs.
Limp: 88-TT, A2s-ATs, AQs-AKs, AJo, A8o
That’s 12 “made” moderately-strong hands, 8 very strong unpaired hands (AQs and AKs), and 60 moderately-strong unpaired hands, for a total of 80 hands in your limping range, or 6.0%. It’s going to be tough to figure out which hands you’ll want to defend to a raise (is A8o better than A2s?), and which if any you’ll want to limp-raise. Your limping range is also more than double the size of your raising range, which seems bad.
Also, if you’re only two spots off the button, then there are only four players left to act behind you. That means that 20% of the time, you’ll have the best hand that’s still active. Two opponents, if they call, would act before you postflop, making it easier to realize your equity. However, the other two would act after you postflop, so you’ll want to knock them out of the pot if possible. Since you’re balanced between players to act before and after you postflop, I’d look to open about 20% of the time, in alignment with the likelihood my hand is the best at the table. If these are your actual HJ ranges, then you’re being way too tight in this spot - and again, should usually look to open rather than limp.
That’s not an unreasoned approach, but it is a novice one, and very exploitable. Don’t think about the hand you hold, think about all the hands you could hold in a given spot. That’s how ranges work. Understanding that, and viewing the hand you actually hold as part of your overall range, will help you to stay balanced and avoid being exploited.