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: 7
Default Please help!!!

I am a complete beginner to VB so all help is much appreciated!!!! I have
been given the following code to update a cell by a percentage uplift:

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

This works fine for one cell but I need to update multiple cells. I have
tried set ib = F4:F20 but this gives error which points back to this line.

Any ideas how to update more than 1 cell by the %. These cells will be
changing dynamically as they come from a analysis services cube. These cells
will all be in one column but there could be x amount of rows to be updated.
Only way I could think of would be to check if the cell 0 in the VB code
and multiply by % then?


John
 
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



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