Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Sum multiple columns; find max

I want to be able to do this in a macro so that it is
invisible to the user. User enters 3 pieces of
data in a new column each week:

wk 1 wk 2 wk 3 ......
OT hours
Repair hours
Cost

I want to be able to sum wk 1 (OT hours + Repair
hours) and then wk 2 (OT hours + Repair
hours) and find the MAX for all weeks input
but I do not want to add another row of data to the
spreadsheet. I want this to be invisible
to the user. Can someone help me achieve this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Sum multiple columns; find max

Opal-

This can be done with VBA, but let me propose an easier alternative: array
formulas. Assuming your grid has data in columns B,C,D and rows 2,3,4:

=MAX((B2:D2+B3:D3+B4:D4))

then while still in the formula, press Cntrl-shift-enter to make it an array
formula. If this is done correctly, it will show on the formula bar as:
{=MAX((B2:D2+B3:D3+B4:D4)) }

you can't enter the { } yourself, Excel will add them when you press
ctrl-shift-enter.

HTH,
Keith


"Opal" wrote:

I want to be able to do this in a macro so that it is
invisible to the user. User enters 3 pieces of
data in a new column each week:

wk 1 wk 2 wk 3 ......
OT hours
Repair hours
Cost

I want to be able to sum wk 1 (OT hours + Repair
hours) and then wk 2 (OT hours + Repair
hours) and find the MAX for all weeks input
but I do not want to add another row of data to the
spreadsheet. I want this to be invisible
to the user. Can someone help me achieve this?

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
Find a value Using a lookup table multiple columns and rows glasspumpkin Excel Worksheet Functions 4 July 2nd 08 04:21 PM
find number in multiple columns and rows JLeoni Excel Worksheet Functions 1 October 25th 06 09:14 PM
find and delete a character from multiple columns scrocker Excel Programming 1 October 11th 06 10:54 PM
Combining find with clearcontents on multiple columns RussB Excel Programming 1 January 13th 06 11:20 PM
Find Values 0 Over Multiple Columns CalumMurdo Kennedy Excel Programming 0 September 18th 03 08:24 AM


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

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"