Jump to content

HELP! Count cell if cellvalue = "x"


This topic is 7866 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've converted an old Excel spreadsheet to a FM database. In my old Excel file I had a list with a column called MoD that contained one of six possible values (FTP, AdDrop, Disk, AdExpress, AdDirect or empty).

My new FM database contains a cell called MoD and I need to be able to count how many records have a value of "FTP in this cell, how many have "AdDrop" in this cell, and so on and so on...

I can do it using AppleScript but it's very slow as it has to check every record individually. I need this to be quick, dynamic and accurate.

I'm a newbie to FM so if you can help me out with clear, precise instructions I would really appreciate it!

Thanks,

Robert

Link to comment
Share on other sites

What a coincidence, somebody else posted a very, very similar question.

We don't allow duplicate posts on the Forums because we hate wasting our time by answering questions more than once, so here is their question and my reply:

http://www.fmforums.com/threads/showflat.php?Cat=&Board=UBB6&Number=49562&Forum=All_Forums&Words=&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=1day&Main=49562&Search=true#Post49562

Link to comment
Share on other sites

Use the following fields:

MoD (text) <-- your original field

FTPFlag (calculation, number): MoD = "FTP" <-- this look funny, but doesn't need an "If" or "Case" as it produces a boolean result.

AdDropFlag (calculation, number): MoD = "AdDrop"

DiskFlag (calculation, number): MoD = "Disk"

etc.

Then:

CntOfFTP (summary field): Total of FTPFlag

CntOfAdDrop (summary field): Total of AdDropFlag

etc.

The summary fields operate upon the found set to give a total of the flag fields.

-bd

Link to comment
Share on other sites

This topic is 7866 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.