Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John T. Sheedy
 
Posts: n/a
Default numbers to text function

I have a list of numbers 0-35 that I have to convert to 8 compass
directions(N, NW, E, ECT.). I used the IF function to search but the string
doesnt work. I tried using an array {1,2,3,33,34,35} for north and it comes
back as false even thought the search number is 35

This is a sample of the finction I am using

=IF(A5={0,1,2,33,34,35},"N",IF(A5={3,4,5,6,},"NE", "NW"))
I carries this formula out to the 7 argument limet and am using the NW to
represent the last compass direction.

Please help

John
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Create a lookup table of the form

0 N
3 NE
7 E
10 NW
....
33 N

that is just create an entry for the lowest number of each point (including
duplicating for N in 33, etc.), and assuming that tab le is ih H1:I10, use

=VLOOKUP(A5,$H$1:$I$10,2)

adjust the lookup range to suit


--

HTH

RP
(remove nothere from the email address if mailing direct)


"John T. Sheedy" <John T. wrote in message
...
I have a list of numbers 0-35 that I have to convert to 8 compass
directions(N, NW, E, ECT.). I used the IF function to search but the

string
doesnt work. I tried using an array {1,2,3,33,34,35} for north and it

comes
back as false even thought the search number is 35

This is a sample of the finction I am using

=IF(A5={0,1,2,33,34,35},"N",IF(A5={3,4,5,6,},"NE", "NW"))
I carries this formula out to the 7 argument limet and am using the NW to
represent the last compass direction.

Please help

John



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert Excel imported numbers from text to numbers? Alden Excel Discussion (Misc queries) 9 April 1st 05 09:51 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 08:22 PM
Converting Numbers to Text properly Shirley Munro Excel Discussion (Misc queries) 1 February 16th 05 04:01 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 11:19 PM
Macro or Function to make text size to suite text Length? lbbss Excel Discussion (Misc queries) 4 December 14th 04 08:53 PM


All times are GMT +1. The time now is 01:03 AM.

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

About Us

"It's about Microsoft Excel"