Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-20-2014, 01:59 PM
champaben champaben is offline Windows 8 Office 2007
Novice
 
Join Date: Jun 2014
Posts: 6
champaben is on a distinguished road
Lightbulb Excel VBA Multiple Automatic Goal Seek Required – Please Assist us

Hello,</SPAN>



I would very grateful if you can please help with the problem I have run into. We sell on Amazon and I am trying to automate our costing sheet so based on margins our selling price can be decided. However, I am struggling as the Amazon fee is a % of the price and hence has a further impact on your margin.

I have uploaded a test excel sheet, with two sheets, here is the link:
https://www.dropbox.com/s/88gfbjzigervvh3/Test.xlsmI have also attached the sheet below if that would be easier.


I have attempted to use a VBA code which is shown below:


Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
 
Dim r As Range
 
Set r = Range("F2,M2")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("J2").GoalSeek Goal:=Range("M2"), ChangingCell:=Range("G2")
Application.EnableEvents = True
End Sub
Now, I have a few problems. The code sort of works, however it does not tackle these issues:

1. It only works for one row at a time, we have thousands of products on our other sheet and I want a code which will cover the entire spreadsheet.

2. I have to paste this code in every sheet, is there a way to put it on the work book

3. We want our min price to be written on the min price column, and same with the max price on the max price column, based on the % specified in other column. How can we run this simultaneously?

4. The cost EX VAT is the addition of B2:E2, however, I have just used F2 which is Cost of EX VAT in the VBA shown, therefore if cost changes, automatically price should change. But this does not work, on the other hand if I specify B2, C2, D2… in the code individually then it works. Why is this?

I do not have amazing knowledge on VBA as I am learning, any help will be greatly appreciated. If you feel like there is an easier way to complete this task, please do say.

Thanks for taking time to help or even read this.

Kind Regards,
Champaben
Attached Files
File Type: xlsm Test.xlsm (19.2 KB, 17 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic entering of multiple words cliff@tauruscommercial.ca Word 5 06-03-2014 06:06 PM
set daily goal for actual workdays, excluding weekends holidays and days off Brian Reilly Excel 1 01-24-2014 11:56 PM
Excel 2007 - formula or macro/vba code required wrighty50 Excel Programming 3 05-13-2012 02:24 PM
Adding a goal line to a chart uhlersa Excel 1 01-16-2012 08:18 PM
Normal.dot Help? Fatally Corrupted; No Fix. Please Assist. atm0073 Word 2 09-21-2009 04:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft