Replace a value with a name

telluride

New Member
Joined
Nov 9, 2005
Messages
4
Is there a way that I can assign a value to "apple" (has a value of 3) and "orange" (has a value of 2) such that I could reference the cells they are in my formula (not write apple or orange in the formula)

Example A1 + B1 = 5 (Not Apple + Orange = 5)
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
telluride said:
Is there a way that I can assign a value to "apple" (has a value of 3) and "orange" (has a value of 2) such that I could reference the cells they are in my formula (not write apple or orange in the formula)

Example A1 + B1 = 5 (Not Apple + Orange + 5)

How many of these do you have? You can use Sumproduct/Lookup

=SUMPRODUCT((LOOKUP(A1:B1,C1:D10)))

Where C1:D1 houses fruits sorted in ascending order and associated values in D1:D10

Edited for spelling!
 

Fat Cat

Active Member
Joined
Nov 5, 2004
Messages
336
Not sure I follow what you are trying to do,

If you just want to reference cells, put the value 3 for an apple in A1 and the value 2 for an orange in A2, then A1 + A2 = 5

If you want to name some ranges; clcik on cell A1 containing the value 3 and then from the top menu use;
INSERT .. NAME .. DEFINE .. call it apple

then click on cell A2
INSERT .. NAME .. DEFINE .. call it orange

now in cell C1 enter =apple + orange
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,956
Messages
5,834,579
Members
430,298
Latest member
Stanles

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
Top