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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
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
 

Watch MrExcel Video

Forum statistics

Threads
1,129,361
Messages
5,635,812
Members
416,884
Latest member
leeshjay

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