Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Howto update prises automaticly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Espen - 08 Jan 2008 12:46 GMT
Hi.

I have som excel dokuments with many articles. They all have 3 price
kategories each.
Is there possible to update all of the prises at one using the forumal:

Price*1,05=NewPrice

The new price shold shold be like this; 2,00 3,00 4,00 and not 2,03 2,99
4,04.
How can i do this? Macro?

Espen
Bernie Deitrick - 08 Jan 2008 14:49 GMT
Espen,

Select the cells with the prices, and run the macro below.  Answer with a whole number (for example,
5) when asked for the increase.

HTH,
Bernie
MS Excel MVP

Sub IncreaseValues()
Dim myC As Range
Dim myMult As Double

myMult = 1 + InputBox("Enter Whole Number Percent increase: e.g. 5 = 5%") / 100

If MsgBox("Multiplier is " & myMult & ". Is that correct?", vbYesNo) = vbNo Then Exit Sub

For Each myC In Selection.SpecialCells(xlCellTypeConstants, 1)
  myC.Formula = "=ROUND(" & myC.Value & "*" & myMult & ",0)"
  myC.Value = myC.Value
Next myC
End Sub

> Hi.
>
[quoted text clipped - 7 lines]
>
> Espen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.