hi to all, what I need is formula at B2 which work like: if 2 comes four times in a row (2222) show number 13(thirteen) in B1.i hope is easy fo you
hi to all, what I need is formula at B2 which work like: if 2 comes four times in a row (2222) show number 13(thirteen) in B1.i hope is easy fo you
Last edited by louis128; 01-14-2019 at 10:03 AM.
have a look to the attached file,thank you
Last edited by louis128; 01-14-2019 at 09:45 AM.
something like:
Formula:Please Login or Register to view this content.
note: array entry requirement
is working!!thank you ,can we modify like that:if any other results shoe zero)?
Last edited by louis128; 01-14-2019 at 11:02 AM.
Not sure I follow your last question, sorry... if you're saying you want to return something other than 0 if there is no run of four consecutive 2s then yes, you could amend to:
Formula:Please Login or Register to view this content.
sorry Xlent, iwas not clear , imean if 2 2 2 2 show 13 as you made but if any other combination show zero, all the rest combinations(like 12231112231313232) the formula to show zero
sorry my engilsh are not so good!!
do not apologise - your English is far better than my Greek (and/or Turkish!)
the first formula should return 0 if no 2-2-2-2 sequence is found, the second formula would allow you to return whatever you wanted (if you did not want 0)
if still not clear please post a sample to explain, and which includes the formulas suggested (to show why they do not work).
is clear! formula should return 0 if no 2-2-2-2 sequence is found,iam Greek.thank you so much
based on your last post (#8) (and I haven't tested XLent's formula nor opened your workbook) but if you want it to return 0 instead of "something else" I would say to adjust it this way....
=IF(MAX(FREQUENCY(IF(A1:A47=2,ROW(A1:A47)),IF(A1:A47<>2,ROW(A1:A47))))>=4,13,0)
confirmed with CTRL + SHIFT + ENTER
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
@SamboKid,
Per post 7, an IF only required if a non-0 alternative is desired - i.e. post 3 can only return one of 13 or 0 - so above entirely redundant.
Last edited by XLent; 01-14-2019 at 02:01 PM. Reason: post #3 rather than #2
As I noted, I wasn't testing anything, I was just guessing. Wasn't sure the OP had their answer so I thought I'd post a guess still giving you credit.
If they got their answer, great.
thanks guys!!!
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
welcome to the forum
For future reference, please take a moment to read the forum rules and use thread titles that are descriptive of your problem - not what you think the answer might be. (think google search terms?).
Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks