Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default update multiple cells by a percentage

I have a spreadsheet which extracts data from a anlaysis server cube.

This brings back multiple numeric figures which are budgets. I would like to
have a button which will update these figures by a percentage placed in a
cell. So if I put 10 in the cell and run function it will update all figures
by 10%.

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default update multiple cells by a percentage

hi
Sub ibpc()
Dim pc As Range
Dim ib As Range
Set pc = Range("G4") '10%
Set ib = Range("F4") '100
ib = ib * (pc + 1) '110
End Sub

edit to fit your data
regards
FSt1

"johnprez" wrote:

I have a spreadsheet which extracts data from a anlaysis server cube.

This brings back multiple numeric figures which are budgets. I would like to
have a button which will update these figures by a percentage placed in a
cell. So if I put 10 in the cell and run function it will update all figures
by 10%.

Is this possible?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default update multiple cells by a percentage

Thanks for the reply but if for example change the range for ib to F4:F20
will that do 10% increase on each individual cell or add them all together?

Also, the amount of rows returned can differ as basically I have 5 columns
of data which could have x amount of rows e.g.:

Basic Pay Overtime Substitution Retainer Other
£1,300.00 £106.00 £137.00 £133.00 £10.00
£800.00 £50.00 £60.00 £45.00 £5.00
£500.00 £56.00 £77.00 £88.00 £5.00

I presume I will have to select a range of the whole 5 columns? Is there
any way of just selecting those cells within this range which have numeric
value or are 0 ?

Thanks for your help......



"FSt1" wrote:

hi
Sub ibpc()
Dim pc As Range
Dim ib As Range
Set pc = Range("G4") '10%
Set ib = Range("F4") '100
ib = ib * (pc + 1) '110
End Sub

edit to fit your data
regards
FSt1

"johnprez" wrote:

I have a spreadsheet which extracts data from a anlaysis server cube.

This brings back multiple numeric figures which are budgets. I would like to
have a button which will update these figures by a percentage placed in a
cell. So if I put 10 in the cell and run function it will update all figures
by 10%.

Is this possible?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default update multiple cells by a percentage

Further to this I have tried the coding with pc = <the cell with percentage
in it and
ib with a single cell to be uplifted by this percentage. This works fine!

However if I change ib to be a range of cells it gives an error....

Basically I need a button that will update multiple fields by a percentage.
Please help!!! NB - I have refined the requirements and only cells in one
column (not five!!)need updating if that makes things bit easier!!


"johnprez" wrote:

Thanks for the reply but if for example change the range for ib to F4:F20
will that do 10% increase on each individual cell or add them all together?

Also, the amount of rows returned can differ as basically I have 5 columns
of data which could have x amount of rows e.g.:

Basic Pay Overtime Substitution Retainer Other
£1,300.00 £106.00 £137.00 £133.00 £10.00
£800.00 £50.00 £60.00 £45.00 £5.00
£500.00 £56.00 £77.00 £88.00 £5.00

I presume I will have to select a range of the whole 5 columns? Is there
any way of just selecting those cells within this range which have numeric
value or are 0 ?

Thanks for your help......



"FSt1" wrote:

hi
Sub ibpc()
Dim pc As Range
Dim ib As Range
Set pc = Range("G4") '10%
Set ib = Range("F4") '100
ib = ib * (pc + 1) '110
End Sub

edit to fit your data
regards
FSt1

"johnprez" wrote:

I have a spreadsheet which extracts data from a anlaysis server cube.

This brings back multiple numeric figures which are budgets. I would like to
have a button which will update these figures by a percentage placed in a
cell. So if I put 10 in the cell and run function it will update all figures
by 10%.

Is this possible?

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
In Excel how do I update cells in multiple sheets simultaneously? kjh1210 Excel Discussion (Misc queries) 1 April 22nd 09 11:01 PM
raising multiple cells containing numbers by a percentage Tammy Dean[_2_] Excel Discussion (Misc queries) 3 July 11th 08 02:48 PM
Changing multiple cells by the same percentage slindsay New Users to Excel 2 June 4th 08 06:05 PM
insert rows and update linked cells in multiple workbooks [email protected] Excel Discussion (Misc queries) 1 April 2nd 07 10:37 PM
Update Format of cells in multiple worksheets AliH Excel Programming 1 August 10th 05 12:19 PM


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