search odd rows only in given cell range

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
657
Office Version
  1. 2019
Platform
  1. Windows
Hello,
Im using the following formula and wondering how to search odd rows only in the given range (H4:H33)?

LOOKUP(2, 1/((COUNTIF($AI$116:$AI116,$H$4:$H$33)=0)*($AW$4:$AW$33<=$AW$1)),$H$4:$H$33)

Criteria = ($AW$4:$AW$33<=$AW$1), can be all rows
Starting Point when filling down ($AI$116:$AI116)

Thank you
 
Im currently using:
IF($U117="","",COUNTIF($H$4:$H$33,$U117))
but it count in all rows. i only want to count in ODD rows.
That COUNTIF seems unrelated to the one in the previous formula but instead of
COUNTIF($H$4:$H$33,$U117)
try
SUMPRODUCT(ISODD(ROW($H$4:$H$33))*($H$4:$H$33=U117))
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
That COUNTIF seems unrelated to the one in the previous formula but instead of
COUNTIF($H$4:$H$33,$U117)
try
SUMPRODUCT(ISODD(ROW($H$4:$H$33))*($H$4:$H$33=U117))
I realize the formula's seem offbeat, but I'm tracking the NBA teams for wagering and I may have a found a slight edge.
These are good suggestions for betting.
the SUMPRODUCT formula seems to work, but it still lists 1 if U118 is blank? see (T:T). T117 is correct.

NBA.xlsm
RSTUVWXYZAAABAC
115Indicator(s)Indicator >= 70%, Counts(AH:AH) >= 10
116W/LTeamVisable%$Cr2 CountOdd Ball
117WCHI1Rank2, AL & AM >60%76.9%$61.0026W188%MAX
118  1    L050%MIN
119  1    Psh0
120  1    Previous65.4% 
121W42.5$80.88Max $$
122Above Works!!L22.5Count
123Total65
124Bet on AboveW43.5
125If Count is 2, Indicaors MUST Be Different to List Team??????L22.5
126How can I list teams if same indicator for both?????
Favs
Cell Formulas
RangeFormula
R117:R120R117=IFERROR(INDEX($C$4:$C$33,MATCH($S117,$A$4:$A$33,0)),"")
S117:S120S117=IF($U117="","",INDEX($A$4:$A$33,MATCH($U117,$H$4:$H$33,0)))
T117:T120T117=SUMPRODUCT(ISODD(ROW($H$4:$H$33))*($AS$4:$AS$33>=0.7)*($AP$4:$AP$33>=10)*($AW$4:$AW$33<=$AW$1)*($H$4:$H$33=U117))
U117:U120U117=IFERROR(LOOKUP(2,1/((COUNTIF($U$116:$U116,$H$4:$H$33)=0)*($AS$4:$AS$33>=0.7)*($AP$4:$AP$33>=10)*($AW$4:$AW$33<=$AW$1)/ISODD(ROW(H$4:H$33))),$H$4:$H$33),"")
W117:W120W117=INDEX($AS$4:$AS$33,MATCH($U117,$H$4:$H$33,0))
X117:X120X117=IF($U117="","",OFFSET(INDIRECT(ADDRESS(AGGREGATE(15,6,ROW($K$39:$AH$80)/($K$39:$AH$80=$U117),1),AGGREGATE(15,6,COLUMN($K$39:$AH$80)/($K$39:$AH$80=$U117),1))),5,2))
Y117:Y120Y117=IF($U117="","",OFFSET(INDIRECT(ADDRESS(AGGREGATE(15,6,ROW($K$39:$AH$80)/($K$39:$AH$80=$U117),1),AGGREGATE(15,6,COLUMN($K$39:$AH$80)/($K$39:$AH$80=$U117),1))),9,2))
AB117AB117=IFERROR(IF($AB$120=0,0,MAX($AB$120,$AB$117)),"")
AB118AB118=IFERROR(IF($AB$118=0,$AB$120,MEDIAN($AB$118,$AB$120,0)),"")
AA117AA117=COUNTIFS($C$4:$C$33,"W",$AS$4:$AS$33,">=.7",$AP$4:$AP$33,">=10",$AP$4:$AP$33,"<>""",$AW$4:$AW$33,"<="&$AW$1)+(AA119*0.5)
AA118AA118=COUNTIFS($C$4:$C$33,"L",$AS$4:$AS$33,">=.6",$AP$4:$AP$33,">=10",$AP$4:$AP$33,"<>""",$AW$4:$AW$33,"<="&$AW$1)+(AA119*0.5)
AA119AA119=COUNTIFS($C$4:$C$33,"Psh",$AS$4:$AS$33,">=.6",$AP$4:$AP$33,">=10",$AP$4:$AP$33,"<>""",$AW$4:$AW$33,"<="&$AW$1)
AB120AB120=IFERROR(AA121/(AA121+AA122),"")
AC120AC120=IF(AB120=A47,"Max %%","")
AB121AB121=($AA$121*4.55)-($AA$122*5)
AC121AC121=IF(AB121>=A38,"Max $$","")
AB123AB123=AA121+AA122
AA124:AA125AA124=$AA117+$AA121
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I can't really tell anything from that since I cannot see the relevant data that the column T formulas are referring to. I also do not know what results would be expected in those column T cells.

Here is a smaller, simpler example of the SUMPRODUCT formula counting values in odd rows only. I coloured the odd rows manually to make visual checking easier.
Isn't this what you want the count to do?

24 01 31.xlsm
HIJK
3ValueCount in odd rows only
4aa0
5bb2
6sc2
7dd1
8as2
9s
10d
11c
12a
13b
14d
15c
16a
17s
18
Search Odd rows (3)
Cell Formulas
RangeFormula
K4:K8K4=SUMPRODUCT(ISODD(ROW($H$4:$H$17))*($H$4:$H$17=J4))
 
Upvote 0
I can't really tell anything from that since I cannot see the relevant data that the column T formulas are referring to. I also do not know what results would be expected in those column T cells.

Here is a smaller, simpler example of the SUMPRODUCT formula counting values in odd rows only. I coloured the odd rows manually to make visual checking easier.
Isn't this what you want the count to do?

24 01 31.xlsm
HIJK
3ValueCount in odd rows only
4aa0
5bb2
6sc2
7dd1
8as2
9s
10d
11c
12a
13b
14d
15c
16a
17s
18
Search Odd rows (3)
Cell Formulas
RangeFormula
K4:K8K4=SUMPRODUCT(ISODD(ROW($H$4:$H$17))*($H$4:$H$17=J4))
Yes it is. Thank you for the help.
 
Upvote 0
Yes it is. Thank you for the help.
You're welcome. So if you are still having trouble with your data & want more help I think we would need some sample data where we had all the inputs and told what the results should be and where they should be. With XL2BB you can hide irrelevant rows and columns and/or make a few smaller mini sheets with sections of data in each.
 
Upvote 0
You're welcome. So if you are still having trouble with your data & want more help I think we would need some sample data where we had all the inputs and told what the results should be and where they should be. With XL2BB you can hide irrelevant rows and columns and/or make a few smaller mini sheets with sections of data in each.
I will attempt to "hide" irrelevant rows and columns for a smaller worksheet. I'm not sure how to do it. I have XL2BB.
 
Upvote 0
I can't really tell anything from that since I cannot see the relevant data that the column T formulas are referring to. I also do not know what results would be expected in those column T cells.

Here is a smaller, simpler example of the SUMPRODUCT formula counting values in odd rows only. I coloured the odd rows manually to make visual checking easier.
Isn't this what you want the count to do?

24 01 31.xlsm
HIJK
3ValueCount in odd rows only
4aa0
5bb2
6sc2
7dd1
8as2
9s
10d
11c
12a
13b
14d
15c
16a
17s
18
Search Odd rows (3)
Cell Formulas
RangeFormula
K4:K8K4=SUMPRODUCT(ISODD(ROW($H$4:$H$17))*($H$4:$H$17=J4))
Regarding searching Odd rows only, how would the Index, Match formula look?
I'm currently using:
INDEX($A$4:$A$33,MATCH($U117,$H$4:$H$33,0))
thank you
 
Upvote 0
Regarding searching Odd rows only, how would the Index, Match formula look?
I'm currently using:
INDEX($A$4:$A$33,MATCH($U117,$H$4:$H$33,0))
Try
Excel Formula:
=INDEX($A$4:$A$33,AGGREGATE(15,6,(ROW($H$4:$H$33)-ROW($H$4)+1)/(($H$4:$H$33=$U117)*ISODD(ROW($H$4:$H$33))),1))
 
Upvote 0

Forum statistics

Threads
1,215,081
Messages
6,123,016
Members
449,093
Latest member
ikke

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