Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default replace a number with a string from database

I want to do the following:
I have in collumn "A" numbers from 1 to 60 and in Collumn "B" there
are corresponding names next to every number. This is my database.
Now i want to write a number between 1 and 60 in a cell in Collumn "D"
and in the cell next to it in collumn "E" shall come up the
corresponding text, which is defined in Column "a" and "B".

How do I write this macro?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default replace a number with a string from database


I don't think you need a macro. A simple vlookup formula will work.

Place this formula in cell E1 and use cell D1 as your input cell.

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


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

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
Use string value for database location - VBA [email protected] Excel Worksheet Functions 1 May 15th 09 01:06 PM
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
parsing on a date string pulled from a database. Zone99 Excel Discussion (Misc queries) 3 July 9th 07 11:49 PM
Frequency of a word string in an excel database Danny_McCaslin Excel Discussion (Misc queries) 2 December 13th 06 06:11 PM
How do I replace last numeric string from a alphanumeric string? Christy Excel Discussion (Misc queries) 3 August 11th 06 12:17 AM


All times are GMT +1. The time now is 12:41 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"