Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a Custom Excel Function to Calculate Gini Coefficients | Excel Worksheet Functions | |||
Date & Time | New Users to Excel | |||
Hyperlinks using R[1]C[1] and offset function in its cell referenc | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |