ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can I have words representing numbers in a formula? (https://www.excelbanter.com/excel-discussion-misc-queries/103550-can-i-have-words-representing-numbers-formula.html)

PeterM

Can I have words representing numbers in a formula?
 
I have several abbreviations representing numbers in a spreadsheet that I
like to automate. I have for instance MGT to VW representing 3 miles than
back to MGT then being 6 miles. Is there a way I can have a formula that can
read MGT VW MGT and that will give a 6 mile total count. I then also have
MGT AUDI ACURA BMW VW MGT. That is a trip I make with my car, and they all
add little mileage to my spreadsheet amounting to 19 miles total. MGT to
AUDI is 5 mi, AUDI to ACURA is 4 miles, ACURA to BMW is 6 miles, BMW to VW
is 1 mi, and the VW to MGT is 3 miles. There are more destinations, but once
I have the idea on how to do it, I can add the miles for different
places.......Peter



Wiley

Can I have words representing numbers in a formula?
 
You could set this up in a table, but would be looking at a lot fo formula
work to handle multiple destiantions in one trip. It seems to me that just
entering the milage would be easier.

Can you tell us how you would enter the data? An exampe of a round trip to
1 destination, vs round trip to mutliple destinations.

"PeterM" wrote:

I have several abbreviations representing numbers in a spreadsheet that I
like to automate. I have for instance MGT to VW representing 3 miles than
back to MGT then being 6 miles. Is there a way I can have a formula that can
read MGT VW MGT and that will give a 6 mile total count. I then also have
MGT AUDI ACURA BMW VW MGT. That is a trip I make with my car, and they all
add little mileage to my spreadsheet amounting to 19 miles total. MGT to
AUDI is 5 mi, AUDI to ACURA is 4 miles, ACURA to BMW is 6 miles, BMW to VW
is 1 mi, and the VW to MGT is 3 miles. There are more destinations, but once
I have the idea on how to do it, I can add the miles for different
places.......Peter




CLR

Can I have words representing numbers in a formula?
 
Should be relatively easy using the VLOOKUP function. You would need to set
up a table listing your codes, and the appropriate mileage for each in the
next column to the right. Say your list was in D1:E25, and the code you
wanted to look up was in A1, then something like this in B1 should work
fine.......

=VLOOKUP(A1,D1:E25,2,FALSE)

hth
Vaya con Dios,
Chuck, CABGx3




"PeterM" wrote:

I have several abbreviations representing numbers in a spreadsheet that I
like to automate. I have for instance MGT to VW representing 3 miles than
back to MGT then being 6 miles. Is there a way I can have a formula that can
read MGT VW MGT and that will give a 6 mile total count. I then also have
MGT AUDI ACURA BMW VW MGT. That is a trip I make with my car, and they all
add little mileage to my spreadsheet amounting to 19 miles total. MGT to
AUDI is 5 mi, AUDI to ACURA is 4 miles, ACURA to BMW is 6 miles, BMW to VW
is 1 mi, and the VW to MGT is 3 miles. There are more destinations, but once
I have the idea on how to do it, I can add the miles for different
places.......Peter




Bill Ridgeway

Can I have words representing numbers in a formula?
 
Yes, in a way. You could name a cell or a range of cells -
Click on -
<Insert<Name<Define
Type the name
Click on <OK

If you had a cells named ABC and DEF you could add the cells by typing the
formula =ABC+DEF

Hope this helps.

Regards.

Bill Ridgeway
Computer Solutions

"PeterM" wrote in message
...
I have several abbreviations representing numbers in a spreadsheet that I
like to automate. I have for instance MGT to VW representing 3 miles than
back to MGT then being 6 miles. Is there a way I can have a formula that
can read MGT VW MGT and that will give a 6 mile total count. I then also
have MGT AUDI ACURA BMW VW MGT. That is a trip I make with my car, and they
all add little mileage to my spreadsheet amounting to 19 miles total. MGT
to AUDI is 5 mi, AUDI to ACURA is 4 miles, ACURA to BMW is 6 miles, BMW to
VW is 1 mi, and the VW to MGT is 3 miles. There are more destinations, but
once I have the idea on how to do it, I can add the miles for different
places.......Peter




PeterM

Can I have words representing numbers in a formula?
 
Many thanks to you for the help, Wiley, CLR and Bill. I'm on the road,
making the rounds. I will answer back tonight...PeterM
"Bill Ridgeway" wrote in message
...
Yes, in a way. You could name a cell or a range of cells -
Click on -
<Insert<Name<Define
Type the name
Click on <OK

If you had a cells named ABC and DEF you could add the cells by typing the
formula =ABC+DEF

Hope this helps.

Regards.

Bill Ridgeway
Computer Solutions

"PeterM" wrote in message
...
I have several abbreviations representing numbers in a spreadsheet that I
like to automate. I have for instance MGT to VW representing 3 miles than
back to MGT then being 6 miles. Is there a way I can have a formula that
can read MGT VW MGT and that will give a 6 mile total count. I then also
have MGT AUDI ACURA BMW VW MGT. That is a trip I make with my car, and
they all add little mileage to my spreadsheet amounting to 19 miles total.
MGT to AUDI is 5 mi, AUDI to ACURA is 4 miles, ACURA to BMW is 6 miles,
BMW to VW is 1 mi, and the VW to MGT is 3 miles. There are more
destinations, but once I have the idea on how to do it, I can add the
miles for different places.......Peter







All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com