Combine a Countif with an Offset

Caveman1964

Board Regular
Joined
Dec 14, 2017
Messages
121
I have tried this every way I could.....I can't get to work but they work seperately.
=countif('Data Collection'!$d$7:$D:$2000,"GA")
=offset('data Collection'!$D$6,1,,2000)

D6 is the header. the data begins D7, but when I insert new row, I lose my data for my chart. The formula moves with it. But the two up above work but I can't get them to work together.
Been working on this for hours, please help.
Any help appreciated.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi Caveman,

It's not clear what you're trying to achieve with these functions, can you post some sample data showing what you want the end result to be?
 
Upvote 0
Sure!
I hope this helps. I don't know much what I am doing but trying to learn.
This is not working well trying to put in this forum.....I am sure there is a better way to do it.
I need one sheet to count the number of times GA shows up in column "Location" which is D beginning at row 7......on sheet 3.
However, I enter new info by inserting into row 7 new info where a new location shows up which will be one of the 4 shown. But my countif on sheet 4 changes and starts to count from row 8 of sheet 2 instead of 7. Every time I enter new, the countif changes down again. I need it to continue to count from D7 sheet two.
I know I am not explaining this well. but I sure hope you can see what I am trying to do.
Thank You

JOBlocationdifferent sheetlocationamount of jobs
123456GAGA3
7827852ALAL1
785272GAFL1
389373FLSC2
373872SC
GA
SC

<tbody>
</tbody>
 
Last edited:
Upvote 0
Hi Caveman,

You could use this dynamic named range with the offset function below and plug that into your countif if.

Note how the offset formula starts before D7 where you are inserting your new row, thus expanding the countif;


Book1
CD
6JOBlocation
7123456AL
8789456AL
9589634GA
10123456GA
117827852AL
12785272GA
13389373FL
14373872SC
15GA
16SC
Sheet3



Book1
AB
1locationamount of jobs
2GA4
3AL3
4FL1
5SC2
Sheet2
Cell Formulas
RangeFormula
B2=COUNTIF(location,Sheet2!A2)
Named Ranges
NameRefers ToCells
location=OFFSET(Sheet3!$D$6,,,COUNTA(Sheet3!$D:$D))
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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