Absolute Offset ?

johnny52

Active Member
Joined
Oct 13, 2006
Messages
333
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
Is there a way to move an absolute value cell reference,up or down in a worksheet column with an offset formula.....or some other method
not using a relative or moderate value...my worksheet is large and the table contents I want to count,keeps changing,skipping rows

In the example below...axy226 is the absolute.......it works fine till the range needs to be changed.... i want a new countif with a new absolute on the workheet without having to manually change the cell in the formula, when I copy it down,The calculation and formula will always be in the same column
so I was hoping to just copy it down....Hope I explained this clearly Thanks everybody.

=IF(C226=C227,COUNTIF($AXY$226:AXY238,$AYC229),COUNTIF($AXY$239:AXY245,$AYC229))

$AXY226 and AXY$226 won't work with
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Not sure I've understood correctly.

You always want $AXY$226 to stay the same in the formula?

Maybe

INDIRECT("$AXY$226")

should do it.
 
Upvote 0
No,I'd like it to change when I skip a few rows within the same column......a new countif because the range will change.......$AXY226 works until i skip down a few rows on the worksheet.Guess that's why its absolute.Thought maybe a formula existed like $AXY$ +1
 
Upvote 0
"No,I'd like it to change when I skip a few rows within the same column"

Ok can we have some examples

You're copying this formula down the column are you?

=IF(C226=C227,COUNTIF($AXY$226:AXY238,$AYC229),COUNTIF($AXY$239:AXY245,$AYC229))
So what do you want it to say on the next few rows, ie, what should it change to?
 
Upvote 0
Yes copying it down the same column possibly skipping 8 rows then again possibly 20 rows etc...

so the new formula would need a new absolute cell to replace $AXY$226...............I know I can just hit the F4 key but I would have to do that numerous times.....I appreciate you helping out :)

=IF(C234=C235,COUNTIF($AXY$234:AXY241,$AYC237)....I've been trying to use an if statement to adjust for the new cell,so far no luck
 
Upvote 0
So in the first row let's say A1 you want

=IF(C226=C227,COUNTIF($AXY$226:AXY238,$AYC229),COUNTIF($AXY$239:AXY245,$AYC229))

in A2 you want

=IF(C234=C235,COUNTIF($AXY$234:AXY241,$AYC237)... everything increased by 8 ?

Is that correct?
 
Upvote 0
well for that example in creased by 8 I have some formulas I'm been trying out and they somewhat work

=IF(C156=C155,0,COUNTIF($AXY156:AXY163,AYC156))

=IF(C157=C158,COUNTIF(OFFSET($AXY157,-1,):AXY164,AYC157))

=IF(C158=C159,COUNTIF(OFFSET($AXY158,-2,):AXY165,AYC158))

it works when the data range changes...the offset has to decrease in each row to read the original correct absolute value
 
Upvote 0
I understand completely,but luckily I have figured out a quick fix,at least for my worksheet

=IF(C2=C3,COUNTIF(OFFSET($AXY2,AYM2,):AXY9,AYC2))

the offset worked and putting a negative running count in another column AYM (-1,-2 etc....)

I was able to copy it down and adjust the absolute value.............I appreciate all the help THANKS ! :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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