Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

lookup values from 1 field/sheet and set values in other sheet

Posted on 2013-12-30
14
Medium Priority
?
314 Views
Last Modified: 2014-01-12
Folks


I need a code that based on a value in field A2 (Sheet 1) goes and looks up a value in column A ( sheet 2 ) and set's the value of that exact
opposite row/col field in sheet 2 in column b to a specific value


i.e.

if

Sheet 1 a2 = 'germany'

then look in column a in sheet 2 for values "capital" ,"currency", "language" and set the value on sheet 2 in the opposite colum to

"berlin","euro","german"


Sheet 1 a2 = 'italy'

then look in column a in sheet 2 for values "capital" ,"currency", "language" and set the value on sheet 2 in the opposite colum to

"rome","euro","italian"


Sheet 1 a2 = 'usa'

then look in column a in sheet 2 for values "capital" ,"currency", "language" and set the value on sheet 2 in the opposite colum to

"washingtondc","dollar","english"

attached a file sample where germany was selected
0
Comment
Question by:rutgermons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 2
14 Comments
 
LVL 23

Expert Comment

by:Danny Child
ID: 39747090
I don't think your example has attached properly?
0
 
LVL 23

Expert Comment

by:Danny Child
ID: 39747648
And! Do you need a macro to do this, or just vlookups?
0
 

Author Comment

by:rutgermons
ID: 39747986
macro will do thanks
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 43

Expert Comment

by:Rob
ID: 39750189
Can you please attach the sample file.
0
 

Author Comment

by:rutgermons
ID: 39751335
see attached
0
 

Author Comment

by:rutgermons
ID: 39751337
0
 
LVL 43

Expert Comment

by:Rob
ID: 39752488
Where are the details of each country stored?  It can't just pull this from thin air.

I type "Australia" in A2... where does the details for sheet2 come from?  Are they hardcoded, on another sheet, or in a database somewhere?

You may be able to use the VLOOKUP function or array formulas if you have this info in the spreadsheet
0
 

Author Comment

by:rutgermons
ID: 39754905
Hi Rob

they are hardcoded (just to keep it simple)
0
 
LVL 43

Expert Comment

by:Rob
ID: 39755551
Can you post an example of how they are hardcoded and i'll knock up a formula for you
0
 

Author Comment

by:rutgermons
ID: 39773977
rob, i just think 2 colums will be sufficient i.e. if captil =berlin in a2 b2 respectively
0
 
LVL 43

Expert Comment

by:Rob
ID: 39774114
Ok i've knocked up a simple demo

on Sheet 2 you can select a country from a drop down list, which will automatically populate the table below it
0
 

Author Comment

by:rutgermons
ID: 39774404
OK, would be keen to see if you can share it

cheers
0
 
LVL 43

Expert Comment

by:Rob
ID: 39774420
Haha I always laugh at those that forget to attach the file :-[ . I'll post it soon
0
 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 39774555
file attache
CASE.xlsx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question