Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default I need to add column based on two conditions using Excel 2003

I'm looking to add totals that are associated with a specific date in column
A (say, 1/13); and a students name in column B (say, Harold). Once those two
conditions are met the formula would add the totals of the associated totals
found in column C and place that total in a cell in Column D. I'm using
Excel 2003.

Thanks much for any insight and expertise you may provide.
--
SW
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default I need to add column based on two conditions using Excel 2003

I expect you will need to post back, because your destination
cell in column D was not specific. This code puts the total
in the next available cell into column D which does not relate
it to its origin. It was also assumed that the values being
totaled contain decimal values, if not, a place is marked for
changing the data type to Long instead of double. It will run
either way and the difference is negligible for this purpose.

Sub stitute()
Dim dt As String, nm As String, lr As Long
Dim ColCval as Double '<<<If no decimals change to Long
lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
dt = InputBox("Enter a date to search", "Date")
nm = InputBox("Enter a name to search", "Name")
For Each c In ActiveSheet.Range("A2:A" & lr)
If Not c Is Nothing Then
If c.Value = dt And c.Offset(0, 1).Value _
= rm Then
ColCval = ColCval + ColCval
End If
Next
ActiveSheet.Cells(Rows.Count, 4).End(xlup) = ColCval
End Sub



"SW" wrote in message
...
I'm looking to add totals that are associated with a specific date in
column
A (say, 1/13); and a students name in column B (say, Harold). Once those
two
conditions are met the formula would add the totals of the associated
totals
found in column C and place that total in a cell in Column D. I'm using
Excel 2003.

Thanks much for any insight and expertise you may provide.
--
SW



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default I need to add column based on two conditions using Excel 2003

Thanks much for your reply. I think I asked for too much. I was mistaken in
asking for 'programming' help. I'm actually looking for a fomuala that loos
at data in one Work Sheet and transfers the sum to a cell in another work
sheet: all within the same Workbook. I've actually got a working formual
using Excel 2007 but the school I'm working at only has Excel 2003 so I need
to rewrite the formuala.
The following is the Excel 2007 formula I'm using:

SUMIFS('2003 StarWords.xlsx'!GrandTotal,'2003
StarWords.xlsx'!WeekOf,"1/13",'2003 StarWords.xlsx'!Name,"Abby")

I hate to bother you with this but if you can help it would be most
appreciated.

With Much Respect.

Steve
--
SW


"SW" wrote:

I'm looking to add totals that are associated with a specific date in column
A (say, 1/13); and a students name in column B (say, Harold). Once those two
conditions are met the formula would add the totals of the associated totals
found in column C and place that total in a cell in Column D. I'm using
Excel 2003.

Thanks much for any insight and expertise you may provide.
--
SW

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default I need to add column based on two conditions using Excel 2003

Why don't you go ahead and post it in the Worksheet functions group. Someone
there who is more familiar with your problem will help you. Just include
your current formula and explain what you want to accomplish. Outside the
file difference in file extensions, I don't know that there is a lot of
difference in the structure of the formula itself.

"SW" wrote:

Thanks much for your reply. I think I asked for too much. I was mistaken in
asking for 'programming' help. I'm actually looking for a fomuala that loos
at data in one Work Sheet and transfers the sum to a cell in another work
sheet: all within the same Workbook. I've actually got a working formual
using Excel 2007 but the school I'm working at only has Excel 2003 so I need
to rewrite the formuala.
The following is the Excel 2007 formula I'm using:

SUMIFS('2003 StarWords.xlsx'!GrandTotal,'2003
StarWords.xlsx'!WeekOf,"1/13",'2003 StarWords.xlsx'!Name,"Abby")

I hate to bother you with this but if you can help it would be most
appreciated.

With Much Respect.

Steve
--
SW


"SW" wrote:

I'm looking to add totals that are associated with a specific date in column
A (say, 1/13); and a students name in column B (say, Harold). Once those two
conditions are met the formula would add the totals of the associated totals
found in column C and place that total in a cell in Column D. I'm using
Excel 2003.

Thanks much for any insight and expertise you may provide.
--
SW

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Thank you for your direction. Much appreciated.


--
SW


"JLGWhiz" wrote:

Why don't you go ahead and post it in the Worksheet functions group. Someone
there who is more familiar with your problem will help you. Just include
your current formula and explain what you want to accomplish. Outside the
file difference in file extensions, I don't know that there is a lot of
difference in the structure of the formula itself.

"SW" wrote:

Thanks much for your reply. I think I asked for too much. I was mistaken in
asking for 'programming' help. I'm actually looking for a fomuala that loos
at data in one Work Sheet and transfers the sum to a cell in another work
sheet: all within the same Workbook. I've actually got a working formual
using Excel 2007 but the school I'm working at only has Excel 2003 so I need
to rewrite the formuala.
The following is the Excel 2007 formula I'm using:

SUMIFS('2003 StarWords.xlsx'!GrandTotal,'2003
StarWords.xlsx'!WeekOf,"1/13",'2003 StarWords.xlsx'!Name,"Abby")

I hate to bother you with this but if you can help it would be most
appreciated.

With Much Respect.

Steve
--
SW


"SW" wrote:

I'm looking to add totals that are associated with a specific date in column
A (say, 1/13); and a students name in column B (say, Harold). Once those two
conditions are met the formula would add the totals of the associated totals
found in column C and place that total in a cell in Column D. I'm using
Excel 2003.

Thanks much for any insight and expertise you may provide.
--
SW



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
Largest value in column A based on conditions in columns B and C Stan Brown Excel Worksheet Functions 7 November 13th 11 04:43 PM
Determine a result of one column based on conditions in two column tel703 Excel Discussion (Misc queries) 1 March 25th 10 05:01 PM
counting based on two conditions in excel 2003 Anand Excel Worksheet Functions 4 March 25th 10 11:42 AM
Excel 2003 Pivot and VBA loop through each record to change cellbackground color based on conditions [email protected] Excel Programming 0 September 18th 08 10:11 PM
Formula to Extract value on 3 column based on two conditions wayliff Excel Discussion (Misc queries) 0 January 12th 06 08:20 PM


All times are GMT +1. The time now is 08:15 AM.

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"