LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Confused about referencing multiple object code rows in other worksheets?


I'm new to VBA coding in Excel and am trying to figure out how to do
this, but I am running lost.

Each month I will have a workbook containing various worksheets, each
worksheet representing an individual account. The worksheets will be
named by account number, like '123456'. I will then import a worksheet
titled 'ocd 123456'. I need to create some code that recognizes the
'ocd 123456' worksheet and adds certain values together to copy to
cells in the '123456' worksheet. There may be 10+ account numbers in
each workbook, corresponding to an equal number of imported 'ocd
######' worksheets in the same workbook.

The 'ocd 123456' worksheet will have a variable amount of rows
depending on account and that month's transactions. The 'ocd 123456'
worksheet will have two columns, column A with a three-digit object
number followed by the corresponding object title and column B
containing a monetary value. Additionally, a single cell in '123456'
will likely need the sum of various object code values from multiple
rows of 'ocd 123456'.

For example:
Cell C22 in '123456' should equal the sum of object codes 901-927 but
not 921 (or 901-920 & 922-927). Each month will likely not have all of
the these object codes, just a few.

123456

Code:
--------------------

A B C
20
21
22 Equipment Purchases =(sum of object codes 901-920 & 922-927 from 'ocd 123456')
23
24

--------------------



ocd 123456

Code:
--------------------

A B
1 001 - Salary 8,000
2 023 - Copies 20
3 901 - Laser Printers 50
4 908 - Light Bulbs 75
5 921 - Overhead 100
6 927 - Staplers 20

--------------------


Therefore, C22 in '123456' should equal 145 (50+75+20).

I would geatly appreciate any help with this or any links or
recommendations of books that may help me along the way.

Thanks,
Collin


--
slunk
------------------------------------------------------------------------
slunk's Profile: http://www.excelforum.com/member.php...o&userid=31957
View this thread: http://www.excelforum.com/showthread...hreadid=516795

 
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
Cell Referencing between multiple worksheets Nelson B. Excel Discussion (Misc queries) 4 July 24th 09 08:55 AM
Referencing cells in multiple worksheets Andrew W Excel Discussion (Misc queries) 3 August 6th 08 02:23 PM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
Macro referencing multiple worksheets JULZ Excel Discussion (Misc queries) 1 October 9th 06 07:46 PM
Confused, again! Object variable not set? davegb Excel Programming 5 January 25th 06 03:25 PM


All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"