Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.misc
flummi
 
Posts: n/a
Default group by report

Hi Trav,

Here's the answers:


'this is for taking a value from a user specified cell and put it
somewhere else

' r = Range("e1").Value '<-- this is where your user has entered
the cell reference
Cells(1, 1).Value = Range(r).Value 'cell(r,c) indicates where to
put the value

'This lets a user specify a column to sort

r = Range("e1").Value '<-- this is where your user has entered
the column letter
Range("A1:A7").Sort _
Key1:=Columns(r)

'This lets a user specify a cell to use that column as sort key

r = Range("e1").Value '<-- this is where your user has entered
the column letter
Range("A1:A7").Sort _
Key1:=Range(r)

'This lets a user specify a range to sum up

sr = Range("e1").Value
er = Range("f1").Value
Set r = Range(sr + ":" + er)
tot = 0
With r
For Each c In r
tot = tot + c.Value
Next c
Range("C6").Value = tot
End With

'This sets "bold" for all cells in the range (1,1) to (10,4)

Range(Cells(1, 1), Cells(10, 4)).Font.Bold = True

Hans

 
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
Pivot table to calc by group xlcharlie Excel Discussion (Misc queries) 0 January 24th 06 10:40 PM
Calculate cell row and column Barb R. Excel Discussion (Misc queries) 7 May 2nd 05 07:02 PM
Need help w/ Weight Formula Tom Excel Discussion (Misc queries) 3 March 4th 05 05:23 PM
Microsoft Access Report into Excel Spreadsheet zeebyrd Excel Discussion (Misc queries) 1 February 27th 05 12:36 AM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


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