Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
pmarques
 
Posts: n/a
Default filling cells acording to the first 3 numbers


How can the following be made (excel 97 SR -2):

in collumm A i have numbers (212021740, ...) i want to fill de collumms
B and C
acording to the first 3 numbers (212).
Collumms B and C must be automaticaly fill in agreement with some
rules
ex: 212XXXXXX Name1 code1
239XXXXXX Name2 code2
241XXXXXX Name3 code3
.... ... ...

Thanks :-)


+-------------------------------------------------------------------+
|Filename: Relat.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3795 |
+-------------------------------------------------------------------+

--
pmarques
------------------------------------------------------------------------
pmarques's Profile: http://www.excelforum.com/member.php...o&userid=25110
View this thread: http://www.excelforum.com/showthread...hreadid=466201

  #2   Report Post  
Gary Brown
 
Posts: n/a
Default


Try these formulas in cells B5 and C5 respectively:-

=VLOOKUP(VALUE(LEFT(A5,3)),$E$5:$G$7,2,FALSE)
=VLOOKUP(VALUE(LEFT(A5,3)),$E$5:$G$7,3,FALSE)

Copy them down to cells B6:B474 and C6:C474

Note you will get #N/A's where the code doesn't exist in the Example
table E5:G7


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=466201

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 do i get all numbers in cells to be divided by 9 at once? Ryan Excel Worksheet Functions 3 August 5th 05 03:56 PM
Filling Blank Cells Pankaj Excel Discussion (Misc queries) 3 June 2nd 05 08:54 PM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 12:44 AM
Converting negative numbers in a range of cells to zero Dede Excel Discussion (Misc queries) 3 January 14th 05 06:23 PM
combining several individual cells of numbers into one cell Jeanne Excel Worksheet Functions 5 November 24th 04 12:31 PM


All times are GMT +1. The time now is 06:39 PM.

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"