London Transport (uk.transport.london) Discussion of all forms of transport in London.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old June 24th 13, 08:16 PM posted to uk.transport.london
external usenet poster
 
First recorded activity at LondonBanter: Oct 2005
Posts: 392
Default Translating integers to strings

I run Excel 2003 on a Windows Vista system.
I have an application in which I want to translate whole, non-negative
numbers to text. The nearest function to meet my need seems to be
OFFSET.
1234567A B C D E
A B C D E
1 Clubs Dimonds Hearts Spades NoTrump
2 0 Clubs

B2 is =OFFSET($A$1,0,$A$2,1,1)
I use 0 for cols to show the problem with the next part
If I ensure
B3 is =OFFSET({"Clubs"},0,$A$2,1,1)
I hoped to do something similar with a constant array.
I accept the error that Excel gives me because help for OFFSET says:

"OFFSET

Returns a reference to a range that is a specified number of rows and
columns from a cell or range of cells. The reference that is returned
can be a single cell or a range of cells. You can specify the number of
rows and the number of columns to be returned.

Syntax

OFFSET(reference,rows,cols,height,width)

Reference is the reference from which you want to base the offset.
Reference must refer to a cell or range of adjacent cells; otherwise,
OFFSET returns the #VALUE! error value."

Obviously, Excel does not accept an array constant as equivalent to a
cell or range of cells. ;(

I am looking for a better way of including the string constants within
formulas, rather than in cells.

I don't like
=IF($A$2=0,"Clubs",IF($A$2=1,"Dimonds",IF($A$2=2," Hearts",IF($A$2=3,"Spades","NoTrump"))))
or
=IF($A$22,IF(A2=0,"Clubs","Dimonds"),IF($A$24,IF ($A$2=2,"Hearts","Spades"),"NoTrump"))

I would value suggestions.
--
Walter Briscoe

  #2   Report Post  
Old June 24th 13, 08:21 PM posted to uk.transport.london
external usenet poster
 
First recorded activity at LondonBanter: Dec 2008
Posts: 2,008
Default Translating integers to strings

Walter Briscoe wrote:
I run Excel 2003 on a Windows Vista system.
I have an application in which I want to translate whole, non-negative
numbers to text. The nearest function to meet my need seems to be
OFFSET.
1234567A B C D E
A B C D E
1 Clubs Dimonds Hearts Spades NoTrump
2 0 Clubs

B2 is =OFFSET($A$1,0,$A$2,1,1)
I use 0 for cols to show the problem with the next part
If I ensure
B3 is =OFFSET({"Clubs"},0,$A$2,1,1)
I hoped to do something similar with a constant array.
I accept the error that Excel gives me because help for OFFSET says:

"OFFSET

Returns a reference to a range that is a specified number of rows and
columns from a cell or range of cells. The reference that is returned
can be a single cell or a range of cells. You can specify the number of
rows and the number of columns to be returned.

Syntax

OFFSET(reference,rows,cols,height,width)

Reference is the reference from which you want to base the offset.
Reference must refer to a cell or range of adjacent cells; otherwise,
OFFSET returns the #VALUE! error value."

Obviously, Excel does not accept an array constant as equivalent to a
cell or range of cells. ;(

I am looking for a better way of including the string constants within
formulas, rather than in cells.

I don't like
=IF($A$2=0,"Clubs",IF($A$2=1,"Dimonds",IF($A$2=2," Hearts",IF($A$2=3,"Spades","NoTrump"))))
or
=IF($A$22,IF(A2=0,"Clubs","Dimonds"),IF($A$24,IF ($A$2=2,"Hearts","Spades"),"NoTrump"))

I would value suggestions.


I wonder if u.t.l is the best place to post this query?
  #3   Report Post  
Old June 24th 13, 09:47 PM posted to uk.transport.london
external usenet poster
 
First recorded activity at LondonBanter: Oct 2005
Posts: 392
Default Translating integers to strings

In message
internet.com of Mon, 24 Jun 2013 15:21:45 in uk.transport.london,
Recliner writes
Walter Briscoe wrote:
I run Excel 2003 on a Windows Vista system.
I have an application in which I want to translate whole, non-negative
numbers to text. The nearest function to meet my need seems to be
OFFSET.


[snip]

I would value suggestions.


I wonder if u.t.l is the best place to post this query?



OOPS in spades.
Thanks for the restraint in your response.
I should have posted to microsoft.public.excel.worksheet.functions.
--
Walter Briscoe


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 London Banter.
The comments are property of their posters.
 

About Us

"It's about London Transport"

 

Copyright © 2017