Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-15-2012, 04:54 AM   #1
Solid State Member
 
Lowe54's Avatar
 
Join Date: Nov 2011
Location: United Kingdom
Posts: 15
Unhappy Excel Macro help

Hi,

I am currently trying to create a macro that takes the value of a percentage in one cell, and adds it to the column of another sheet

For example

I enter 3.4 in a cell formatted as percentage, click on a increase price button
and it adds that percentage to the values contained in a column of another sheet.

This is what my current code looks like
----------------------------------------------------
Public Sub increaseprice()
Option Explicit

'This module is responsible for increasing the prices of the sweets by a set percentage
Dim ssrange As Range

With Sheets("Sweet Data").select


Set ssrange = Range("B1:B" & .Range("A65536").End(xlUp).Row)

ssrange.Formula = _
"='Sweet Data'!B:B + 'PriceMod'!C5%"

End With


End Sub
-----------------------------------------------------------

Can this be done?

Any help is appreciated

Lowe54
__________________

Lowe54 is offline   Reply With Quote
Old 05-16-2012, 01:08 PM   #2
Fully Optimized
 
jmacavali's Avatar
 
Join Date: Jun 2009
Posts: 4,867
Default Re: Excel Macro help

There are many forums that specialize in Excel help. You might fight better help on one of those.
__________________

__________________
****************************************
Don't take life too seriously -- no one gets out alive. Plus, who wants to arrive to the hereafter in pristine condition wearing a suit and tie?
I want to slide in sideways, worn out, used up, hair a mess, clothes tattered, & screaming, "Whooo! What a ride!"
****************************************
jmacavali is offline   Reply With Quote
Old 05-18-2012, 03:50 AM   #3
Solid State Member
 
Lowe54's Avatar
 
Join Date: Nov 2011
Location: United Kingdom
Posts: 15
Default

Ok I will try an excel forum , thanks for the help
Lowe54 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 12:51 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0