#1   Report Post  
Posted to microsoft.public.excel.misc
phil2006
 
Posts: n/a
Default Function help!


What function would I need to use to update from my second sheet to my
first using macros? I am creating a sheet based on countries so when
the Ukraine, for example, is the country in question I need to add
their corresponding value and when the country is Canada I need to add
theirs etc. I have been attempting using the 'if' function but this
does not work and doesn't include enough potential country names.
Ideally I need a function that shall allow me to add each countries'
individual corresponding value.
Thanks for your help.


--
phil2006
------------------------------------------------------------------------
phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
View this thread: http://www.excelforum.com/showthread...hreadid=548521

  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Function help!

Hi Phil

On your second sheet create a list of all of your countries in column A,
and the values you want associated with them in column B.
On sheet 1, with the country name entered in A1 use the following
formula in B1
=VLOOKUP($A1,Sheet2!$A$1:$B$100,2,0)
Change the range on Sheet2 from A1:B100 to include all of the data you
have set up on Sheet2.

If there is more than one value you want to retrieve for each country,
then include this data in column C, D etc. and alter the range to
A1:D100 for example.
Change the formula to
=VLOOKUP($A1,Sheet2!$A$1:$D$100,COLUMN(1:1),0)
then drag the formula across into cells C1 and D1 on Sheet1.

--
Regards

Roger Govier


"phil2006" wrote
in message ...

What function would I need to use to update from my second sheet to my
first using macros? I am creating a sheet based on countries so when
the Ukraine, for example, is the country in question I need to add
their corresponding value and when the country is Canada I need to add
theirs etc. I have been attempting using the 'if' function but this
does not work and doesn't include enough potential country names.
Ideally I need a function that shall allow me to add each countries'
individual corresponding value.
Thanks for your help.


--
phil2006
------------------------------------------------------------------------
phil2006's Profile:
http://www.excelforum.com/member.php...o&userid=35092
View this thread:
http://www.excelforum.com/showthread...hreadid=548521



  #3   Report Post  
Posted to microsoft.public.excel.misc
phil2006
 
Posts: n/a
Default Function help!


Thanks very much, I feel like I'm getting there a bit but it's still not
working. My second page list is long and countries appear numerous times
in the column. I need to find a way of adding their totals each time
onto the first page and each new value shall displace the old one using
the macros.
Is there a function that could do this?

Thanks again


--
phil2006
------------------------------------------------------------------------
phil2006's Profile: http://www.excelforum.com/member.php...o&userid=35092
View this thread: http://www.excelforum.com/showthread...hreadid=548521

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
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


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