search odd rows only in given cell range

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
684
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
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Maybe you can try adding this If statement to check whether the row is odd.

VBA Code:
=IF(ISODD(ROW(H4:H33))=FALSE,"Even","Odd")
 
Upvote 0
Maybe you can try adding this If statement to check whether the row is odd.

VBA Code:
=IF(ISODD(ROW(H4:H33))=FALSE,"Even","Odd")
Everything comes back as "Even".
NBA.xlsm
AIAJ
117Even
118Even
119Even
120Even
Favs
Cell Formulas
RangeFormula
AI117:AI120AI117=IF(ISODD(ROW($H$4:$H$33))=FALSE,"Even",LOOKUP(2,1/((COUNTIF($AI$116:$AI116,$H$4:$H$33)=0)*($AW$4:$AW$33<=$AW$1)),$H$4:$H$33))
 
Upvote 0
Does this do what you want?
⚡I would be wary about using the odd row numbers directly like this though. It is not uncommon to add a row into a worksheet and then suddenly those odd rows would become even rows.

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

If the above formula does what you want and you would want to allow for possible row insertion (or deletion) then post back for a 'security update' :)
 
Upvote 0
Solution
Does this do what you want?
⚡I would be wary about using the odd row numbers directly like this though. It is not uncommon to add a row into a worksheet and then suddenly those odd rows would become even rows.

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

If the above formula does what you want and you would want to allow for possible row insertion (or deletion) then post back for a 'security update' :)
Does exactly what I'm looking for...Thank you!
 
Upvote 0
Does this do what you want?
⚡I would be wary about using the odd row numbers directly like this though. It is not uncommon to add a row into a worksheet and then suddenly those odd rows would become even rows.

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

If the above formula does what you want and you would want to allow for possible row insertion (or deletion) then post back for a 'security update' :)
If I want to add 2 criteria do I add ISODD(Row, I've tried but its not working?
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)
 
Upvote 0
If I want to add 2 criteria do I add ISODD(Row, I've tried but its not working?
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)
Nevermind for now. Im testing it, and it doesn't seem to matter if I add ISODD to the criteria. Its only looking at ODD rows for the Answer.?.
 
Upvote 0
That formula works for me. Yes, it is still only retrieving values from odd rows.
 
Upvote 0
That formula works for me. Yes, it is still only retrieving values from odd rows.
Thank you.
I'm looking to count the answer in the ODD rows. How would that been done?
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.
(U117 is the answer)
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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