Using formula based on text in a different cell


Jason Pettress

Hello. I have a list of calculations that I have to perform each week and I
decided to use excel to simplify the task. I will use generic examples. I
have a group of agents which call on any of 4 different programs. We will
say program A-D. Each program has a different goal. Each agent has an
average sales per hour for the week. Instead of pasting in a specific
formula for each different program, I want to be able to have excel
determine which formula to use based on what program.


1 John Doe ProgA SPH %ofGoal
2 Jane Doe ProgB SPH %ofGoal
3 Dick Doe ProgC SPH %ofGoal
4 Harry Doe ProgD SPH %ofGoal

I want to be able to do the following.

If the text in column B = ProgA then divide the value in column C by GoalA
to find %ofGoal
If the text in column B = ProgB then divide the value in column C by GoalB
to find %ofGoal

I have come up with something like


but it doesn't work and it only checks for one possibility

Is what I want to do even possible? I have my spreadsheet set up so far so
that I can copy paste the information from our intranet and I have named
cells which you just enter the value for goal each week since it changes.
(GoalA, GoalB, etc.)

Thank You

Jason Pettress
On Site Technical Support
Global Contact Services
2200 Main Street, 3rd Floor
Wheeling WV, 26003
Phone: (304)232-7181
Fax: (304)232-7186‎



Jason Pettress

I actually figured it out myself through trial and error. I'm new to excel
so Im patting myself on the back right now, lol.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question