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: 385
Default Help finding colum with VBA

I need to be able to determine the column number for the date "1/1/2004" so
that I can substitute it into a range declaration used for a calculation.

The data comes to me in the following format:
Name Month Month Month Month 1/1/2004 Month
=======================================
Jeff 50 11 22 31 100 14
Bob 5 101 122 88 100 14
Jim 150 11 22 31 100 14

So the calculation I'm trying to build looks like this:
z = xlApp.ActiveSheet.UsedRange.Row - 1 +
xlApp.ActiveSheet.UsedRange.Rows.Count
Set xlRng2 = xlApp.Range(xlApp.Cells(4, 3), xlApp.Cells(z, 3)) 'Job
Family Column

y = xlApp.ActiveSheet.UsedRange.Column - 1 +
xlApp.ActiveSheet.UsedRange.Columns.Count
Set xlrng3 = xlApp.Range(xlApp.Cells(4, y), xlApp.Cells(z, y))

xlApp.Range("j27") =
xlApp.WorksheetFunction.SumIf(xlApp.Worksheets("Re source
Info").Range(xlRng2), "QA",
xlApp.WorksheetFunction.SumIf(xlApp.Worksheets("Re source
Info").Range(xlRng2).Offset(0, ColRef)))

Part of the problem here is that the "1/1/2004" COLUMN IS NOT ALWYS IN THE
SAME place each time I get the report. ANy help is appreciated
 
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
Keeping a sum colum correct after inserting a colum of data in fro hazel Excel Discussion (Misc queries) 3 October 19th 05 09:51 PM
Finding the minimum in a selected number of rows of the same colum Mark Rugers Excel Worksheet Functions 5 July 20th 05 10:37 PM
Check data on colum A and find match on colum b Chris(new user) Excel Discussion (Misc queries) 3 March 20th 05 04:45 PM
Look up data in colum a and find match in colum b Chris(new user) Excel Discussion (Misc queries) 1 March 19th 05 09:27 PM
lookup in colum a and compare values in colum b Boggled Excel User Excel Worksheet Functions 14 October 29th 04 06:38 PM


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