Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Search and add numbers from many WBs depending on ID column

Hi guys I work in a school and they asked me to tell them which
students got the total full mark in all subjects, my problem is every
subject have its own excel workbook file, the students are sorted by
class then by IDs, from subject to subject the file may be different (I
tried referencing and it didn't work as expected) like some grades may
not take a particular subject this means that this subject file will
have a missing rows so I thought I could make a macro to do the
following:
- check the ID of the student
- get the total marks in all workbooks for that student depending on ID
and add them together
- copy the students with total full mark to a new workbook
- loop until it finish all the students IDs
I am not that good in excel VBA but do you think this could be done
using macro or am I going the wrong path?

note: I thought about using the search for ID approach instead of just
using cell offset because they are going to use the macro with
different files later on that may be a complete mess and the ID is the
only thing we can relay on.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Search and add numbers from many WBs depending on ID column


Hi Talista,

FWIW, yes this all sounds perfectly feasible for a VBA project. Looks
like your facing a steep learning curve though. ?;^)

NickH

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Search and add numbers from many WBs depending on ID column

Sorry Talista,

My previous response was rather unhelpful.

If your serious about learning VBA I can recommend the Power
Programming books by John Walkenbach. Excellent for all levels of
experience.

And here are some useful links...

http://www.mrexcel.com/archive/VBA/index.html

http://www.vba-programmer.com/#ExcelBkmk

http://www.rondebruin.nl/tips.htm

http://www.exceltip.com/category.html#6


Also Chip Pearson provides an excellent resource...

http://www.cpearson.com

Kind regards, NickH

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Search and add numbers from many WBs depending on ID column

Hi NickH,
Thanks for the links I found it really informative, it seems like this
task is beyond my basic VBA skills but I'll try to do it my only
problem is with the deadline, anyways am stuck in something now, how do
you search for a number in all workbooks? If you have an answer please
do because I am kind of lost here :)
NickH wrote:
Sorry Talista,

My previous response was rather unhelpful.

If your serious about learning VBA I can recommend the Power
Programming books by John Walkenbach. Excellent for all levels of
experience.

And here are some useful links...

http://www.mrexcel.com/archive/VBA/index.html

http://www.vba-programmer.com/#ExcelBkmk

http://www.rondebruin.nl/tips.htm

http://www.exceltip.com/category.html#6


Also Chip Pearson provides an excellent resource...

http://www.cpearson.com

Kind regards, NickH


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Search and add numbers from many WBs depending on ID column

Assuming all the required workbooks are open, and assuming you are
doing the sensible thing and keeping your application workbook (with
the code in) separate from the data, you can loop through the open
workbooks like so...

Dim wbk as Workbook
Dim wks as Worksheet

' Loop through open workbooks
For each wbk in Application.Workbooks
'Ignore application workbook
if wbk < Thisworkbook then

'Loop through worksheets in each workbook
For each wks in wbk.Worksheets
'Put your search code etc. in here
'
'

Next wks

End If
Next wbk


That's enough for now - I mean you wouldn't want me to do the whole
thing for you would you. ?;^)

Kind regards, NickH

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
Counting Cells in a column depending on another column but excluding duplicates rwenger Excel Discussion (Misc queries) 0 April 11th 10 01:06 PM
How do I search for repeated numbers in same column MB New Users to Excel 1 October 28th 09 07:16 PM
Total numbers in column where the row cell matches the search crit Kane Excel Worksheet Functions 1 September 6th 09 02:11 PM
Search for duplicate entries in a column of numbers Eán[_2_] Excel Worksheet Functions 2 March 17th 09 02:35 PM
Search and add numbers from many WBs depending on ID column [email protected] Excel Discussion (Misc queries) 1 December 5th 06 10:12 PM


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