Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2006, 10:28 PM
Registered User
 
Join Date: May 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent Help...

Hi, i am new to Excel Coding, i was always with Vb05. anyway, i was wondering if my Problem can be solved in which way. Here it goes.
i have 2 files A ,B... A have 2 colums which one is for name the other for cost.

1st question. is it possible to PreCode File B this way E.g

COlA COlB
Andy 20
Andy 30
Fred 40

if i key in andy in excel file B it search row by row for all the andy which is located in file A and Sum up the Costs in Col B.

Do i need a Interface? or is not Neccessary?
can anyone help me with this Excel Stuff???
i appreciated if i can have a Example.. Thanks

 
Old June 26th, 2006, 02:45 PM
Authorized User
 
Join Date: Mar 2006
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use the sumif function.. ie if in worksheet B you have

COlA COlB
Andy 20
Andy 30
Fred 40

then in worksheet A cell(1,1) you enter the name of the person, in cell (1,2) enter the formula
Code:
=SUMIF('C:\temp\[Book2.xls]Sheet1'!$A$2:$A$4,A1,'C:\temp\[Book2.xls]Sheet1'!$B$2:$B$4)
you can change the file path.
first arguement is equivilent to COlA
second arguement is the location of the search name
third arguement is the range to be summed

hope this helps






Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent deb_kareng ASP.NET 2.0 Professional 1 August 13th, 2007 07:29 AM
it's urgent deb_kareng ASP.NET 2.0 Professional 3 August 7th, 2007 07:40 AM
urgent help yash_coolbuddy_forindia BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 May 7th, 2007 08:40 AM
urgent???????????? nsr35 Beginning VB 6 1 October 3rd, 2005 10:57 AM
urgent ??????????????? nsr35 Pro VB Databases 0 October 3rd, 2005 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.