Skip a column help

chef855

New Member
Joined
Sep 28, 2022
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Hi there!

I've dug around Google and I cannot get this to work at all. I'm trying to track attendance for one class that's split. So students might attend before lunch, but not after lunch or vice versa. I have my columns set as such: H2 would say 9/14 Pre and then I2 would say 9/14 Post. I'm trying to get it so that it counts only one instance. So if a student was absent for both halves it's one absence in the total, not 2. Hope this makes sense. I've tried doing a few different formulas and ideas, but nothing that seems to do what I'm looking for.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Are you just looking at 2 columns, or are you looking at pairs of columns over a wider range?

If it is a wider range are they consecutive columns, or is there other information between them?
 
Upvote 0
It's going to be an ongoing spreadsheet over the semester as we are tasked with tracking student tardies... PITA! It's pairs of columns over a longer range
 
Upvote 0
Based on how you have described it, I would try something like this. I've only used 3 pairs of columns in the example but it can be expanded as needed.

Book1
FGHIJKLM
239/14 Pre9/14 Post9/15 Pre9/16 Post
Sheet7
Cell Formulas
RangeFormula
F2F2=SUM(IF(FREQUENCY(IF($H2:$M2<>"",COLUMN($H2:$M2)),IF(MOD(COLUMN($H2:$M2),2),COLUMN($H2:$M2))),1))
 
Upvote 0
Solution
Okay! I guess this is where I get stuck. Where would I increase the columns it counts? Or just wherever it says $M$2, put in my last column?
 
Upvote 0
wherever it says $M$2, put in my last column?
Not as stuck as you thought, that's exactly how you would do it.

One other thing that I forgot to mention is that the formula is based on each pair starting in an even numbered column (H, J, L, N, etc) if the pairs are starting in an odd numbered column then you will need to use this one instead. Almost the same, but has an =0 check on the column pairs which is not used in the other one.
Excel Formula:
=SUM(IF(FREQUENCY(IF($I2:$N2<>"",COLUMN($I2:$N2)),IF(MOD(COLUMN($I2:$N2),2)=0,COLUMN($I2:$N2))),1))
 
Upvote 0
Not as stuck as you thought, that's exactly how you would do it.

One other thing that I forgot to mention is that the formula is based on each pair starting in an even numbered column (H, J, L, N, etc) if the pairs are starting in an odd numbered column then you will need to use this one instead. Almost the same, but has an =0 check on the column pairs which is not used in the other one.
Excel Formula:
=SUM(IF(FREQUENCY(IF($I2:$N2<>"",COLUMN($I2:$N2)),IF(MOD(COLUMN($I2:$N2),2)=0,COLUMN($I2:$N2))),1))
I plugged it into my spreadsheet and now I'm getting a #value error.
 

Attachments

  • Screenshot 2022-09-28 153141.jpg
    Screenshot 2022-09-28 153141.jpg
    98.1 KB · Views: 5
Upvote 0
I can't see any reason for that to happen. Do you have any #VALUE! errors anywhere in the columns H:AZZ ?
 
Upvote 0
I can't see any reason for that to happen. Do you have any #VALUE! errors anywhere in the columns H:AZZ ?
I don't see any?
 

Attachments

  • Screenshot 2022-09-29 091346.jpg
    Screenshot 2022-09-29 091346.jpg
    176 KB · Views: 7
Upvote 0
I've tried the exact formula that you have in your screen capture and don't get any errors.

Does it work correctly for you with a smaller range like the one in the example formula that I posted?
 
Upvote 0

Forum statistics

Threads
1,215,202
Messages
6,123,625
Members
449,109
Latest member
Sebas8956

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