CheckEmoji Community · the emoji forum
🏠 Home 🆕 What's new ❓ Unanswered 🔥 Popular 📡 RSS Members 👥 0 online log in · register
Home › frozenheron7 › Posts

Posts by frozenheron7

141 posts shown.

Alex Barnes4 said:I'm running into a bit of a headache in Excel. Let's say I have a column from A1 to A10 where I'm inputting whole numbers, and then another column from B1 to B10 filled with different whole numbers. Now, I want cell C1 to show me the total number of instances where the value in column A is greater than the corresponding value in column B. Essentially, I need to compare A1 to B1, A2 to B2, A3 to B3... all the way down to A10 vs B10. Every single time the number in column A beats the one in column B, I want C1 to increment by +1. Can anyone write me a function that handles this specific logic? Once I see how it works, I can easily tweak it for my actual project.

Look, there's a bit of a workaround here. I'll have to sit down and figure out the exact syntax to make this work with a COUNTIF function.

To get started, just pop this formula into cell C1:
=IF(A1>B1,1,"")
then grab the fill handle and drag it down through all 10 rows.

This little formula will basically flag every instance where A is greater than B by putting a "1" in column C.
Once you've done that, just sum up everything in that C column:
=SUM(C1:C10)