VBA Different but related alpha alues in col A & B then count values = to (number) in Col H

JMC57

Board Regular
Joined
Apr 24, 2012
Messages
118
I have data in a spreadsheet with different but related Alpha locations in Col A&B. I need to count specific values in Col H for each Alpha value. The ALPHA values vary and are numerous. I am trying to accomplish the following,

If Exact alpha values in col A & B (A is a facility code and B is a station code) then count values = to 0.25 in col H
If Exact alpha values in col A & B (A is a facility code and B is a station code) then count values = to .0.5 in col H
If Exact alpha values in col A & B (A is a facility code and B is a station code) then count values = > 1 in col H

I would like to display the results in a second tab spreadsheet such as
Col A =Facility Code; Col B Station; Col C count values = to 0.25; Col D count values = to .0.5 in col H
And Col D =) then count values = > 1 in col H


Since I have to repeat this once to twice a week for 20 facilities. I was attempting excel codes to make this work so that I can cut and paste data in a template. There are typically 60,000 rows of data. I need help with a VBA code to save time.
Any help or suggest VBA or Excel will help. Thank you
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi JMC57,

You could put this formula in any cell on any sheet in your workbook, providing that your data is on Sheet1. Or Change that to where the data is..

=COUNTIFS(Sheet1!A:A,"facility code",Sheet1!B:B,"station code",Sheet1!H:H,"<=.25")

This is for your fist criteria but just change the last value of the statement for your other criteria.

If Exact alpha values in col A & B (A is a facility code and B is a station code) then count values = to 0.25 in col H

HTH

igold
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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