you can write a macro in the VBA coding environment in Excel. the command left(string1,n) will extract the first n characters from a string that you feed it. If you omit n, it is a assumed to be one. Now write a simple macro using that function and have it check each item in the column or row for the first letter, and then add +1 to a count variable each time it finds one beginning with p. Then print that count variable to whatever cell you feel like.
Sorry, I am a bit pressed for time, or else I would write a sample program. That should get you started though. Good luck!
You accidentally bought a bootleg copy, kinda like going to the store for Fruit Loops and leaving with the supermarket brand ‘Colored Citrus Os’. And now you’re surprised when you get GI lacerations from the drywall used to give it extra crunch.
[quote]anonym wrote:
You accidentally bought a bootleg copy, kinda like going to the store for Fruit Loops and leaving with the supermarket brand ‘Colored Citrus Os’. And now you’re surprised when you get GI lacerations from the drywall used to give it extra crunch.
Buy ‘Excel’ and you should find things easier.[/quote]
Eh mods changed the title I think … I do have excel.
A quick and dirty way would be sorting the column alphabetically, then summing the associated numbers in the next column. I’m sure there is a better way tho.
[quote]Captnoblivious wrote:
how many times do you have to do this task?
A quick and dirty way would be sorting the column alphabetically, then summing the associated numbers in the next column. I’m sure there is a better way tho.[/quote]
It’s an example of the kind of stuff they would be requiring me to do if I applied for that particular department…
Don’t know if this is what you’re looking for, but I did a quick formula in one cell that counted the number of instances in a range of cells (a column) that a value starting with “P” (ie. “P*” occurred.
[quote]SteelyD wrote:
Don’t know if this is what you’re looking for, but I did a quick formula in one cell that counted the number of instances in a range of cells (a column) that a value starting with “P” (ie. “P*” occurred.
[quote]SteelyD wrote:
Don’t know if this is what you’re looking for, but I did a quick formula in one cell that counted the number of instances in a range of cells (a column) that a value starting with “P” (ie. “P*” occurred.
I still don’t think that’s quite right SteelyD → If you look at his screenshot, the “D” column has a count of how many items for that particular “C” column exist. That means that he needs to sum the values of the “D” column only when “C” column match the criteria of starting with a “C”, “D”, or “P”.
I’m attaching another screen shot using the formula I showed before. (Modified slightly to include the “P” column.
I’ve basically added a 5th column that will contain a number greater than zero only if the “C” column starts with a letter “C”, “D”, or “P”.