Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default Need A Solution To A Problem

Hi Guys!

I need help with a macro.

I have a value in cell A1 of Sheet 1 e.g. A12345

I have a list in Sheet 2 with a list of values e.g. A12344, A12345, A12346
etc. with an associated value e.g. HOME, AWAY, INDOOR

I want to be able to take the value from Sheet 1, find it in Sheet 2, and
paste the associated value from Sheet 2 into Sheet 1, cell B1.

I then have a different value in cell A2 of Sheet 1 and I need to look this
up etc.

Can someone please help me?

Thanks!
Dave
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default Need A Solution To A Problem

Hi Sandy,

I appear to have got some of my things mixed up and could do with some help
amending the =VLOOKUP formula.

My code in Sheet 1 is in Column B

My code in Sheet 2 is in Column B

My TYPE in Sheet 2 is in Column A

I need this TYPE then pasted into Column G of Sheet 1.

Thanks!
Dave

"Sandy Mann" wrote:

Do you really want a Macro?

=VLOOKUP(A1,Sheet2!A1:B23,2,0)

Will do what you want.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Dave" wrote in message
...
Hi Guys!

I need help with a macro.

I have a value in cell A1 of Sheet 1 e.g. A12345

I have a list in Sheet 2 with a list of values e.g. A12344, A12345, A12346
etc. with an associated value e.g. HOME, AWAY, INDOOR

I want to be able to take the value from Sheet 1, find it in Sheet 2, and
paste the associated value from Sheet 2 into Sheet 1, cell B1.

I then have a different value in cell A2 of Sheet 1 and I need to look
this
up etc.

Can someone please help me?

Thanks!
Dave




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Need A Solution To A Problem

To give you an exact formula, if you're at all familiar with Excel cell and
range addresses, we'll need to know the address of your code on sheet1 and
the addresses of your code/type range on sheet2 and the address of the cell
in column G on sheet1 where you want the result put.

Tyro

"Dave" wrote in message
...
Hi Sandy,

I appear to have got some of my things mixed up and could do with some
help
amending the =VLOOKUP formula.

My code in Sheet 1 is in Column B

My code in Sheet 2 is in Column B

My TYPE in Sheet 2 is in Column A

I need this TYPE then pasted into Column G of Sheet 1.

Thanks!
Dave

"Sandy Mann" wrote:

Do you really want a Macro?

=VLOOKUP(A1,Sheet2!A1:B23,2,0)

Will do what you want.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Need A Solution To A Problem

Hi Dave,

VLOOKUP() cannot look to the left so use INDEX() & MATCH

In G2, (I am assuming that you have labels in Row 1), enter the forumula:

=INDEX(Sheet2!$A$2:$A$32,MATCH(B2,Sheet2!$B$2:$B$3 2,0))

Change the ranges to suit the ranges that you are using.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Dave" wrote in message
...
Hi Sandy,

I appear to have got some of my things mixed up and could do with some
help
amending the =VLOOKUP formula.

My code in Sheet 1 is in Column B

My code in Sheet 2 is in Column B

My TYPE in Sheet 2 is in Column A

I need this TYPE then pasted into Column G of Sheet 1.

Thanks!
Dave

"Sandy Mann" wrote:

Do you really want a Macro?

=VLOOKUP(A1,Sheet2!A1:B23,2,0)

Will do what you want.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Dave" wrote in message
...
Hi Guys!

I need help with a macro.

I have a value in cell A1 of Sheet 1 e.g. A12345

I have a list in Sheet 2 with a list of values e.g. A12344, A12345,
A12346
etc. with an associated value e.g. HOME, AWAY, INDOOR

I want to be able to take the value from Sheet 1, find it in Sheet 2,
and
paste the associated value from Sheet 2 into Sheet 1, cell B1.

I then have a different value in cell A2 of Sheet 1 and I need to look
this
up etc.

Can someone please help me?

Thanks!
Dave







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
sum if problem, trying to find best solution shalombi Excel Discussion (Misc queries) 5 May 31st 06 12:57 PM
Rounding percentages problem need a solution for jimtmcdaniels Excel Discussion (Misc queries) 2 April 27th 06 08:22 AM
Need solution to formula problem sweetsue516 Excel Discussion (Misc queries) 1 September 1st 05 03:46 AM
Macro Solution for Link Problem? Mikeice Excel Worksheet Functions 2 June 14th 05 07:49 AM
Pesky little problem with no solution? Bony Pony Excel Worksheet Functions 5 February 2nd 05 03:15 PM


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