Is there a formula that will calculate how many total products are being ordered from USF & PFG vendors?

Is there a formula that will calculate how many total products are being ordered from USF & PFG vendors? Some type of if statement that says if its assigned to USF and there is a quantity in the column just to the right of it to count it in the total?


[Re-Titled by Moderator]

MacBook Pro 13″, macOS 13.6

Posted on May 5, 2024 4:51 PM

Reply
6 replies

May 8, 2024 3:16 PM in response to rkcrizzle

If you really meant "B has a number in it" rather than "B is not empty",


=COUNTIFS(A,"USF",B,REGEX("^\d+$"))


But your screenshot has names of products in column B, not numbers, so I don't know if this is what you actually want. It will count rows that have "USF" in column A and a number (one or more of the digits 0-9 and no other characters) in column B. If your definition of "a number" includes the comma and decimal point, a slight change will be required.


If you want "B is not empty",

=COUNTIFS(A,"USF",B,"<>")


If you want "B has at least one numeric digit, along with other text",


=COUNTIFS(A,"USF",B,REGEX("\d"))




May 8, 2024 8:46 AM in response to 6x6

I need the formula to only count the vendor if there is a quantity in the box to the right of that vendor code. so that I get a total case count for each vendor. so an if statement that says if A = USF & B (has a number) then I need to apply that to all lines down the whole document to get the total. does that make any sense?

May 9, 2024 10:50 AM in response to rkcrizzle

"Not empty" is probably sufficient. You have "USF" in two different column. I am using the first one for the formula. I'm going to assume the wide line after column B it is just a wide gridline, not evidence of a hidden column.


=COUNTIFS(B,"USF",E,"<>")


I recommend you turn off categories while editing the table (i.e., while entering formulas).


When taking a screenshot of a table it is helpful if you have the table selected so the column letters and row numbers are showing (and include them in the screenshot).



Is there a formula that will calculate how many total products are being ordered from USF & PFG vendors?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.