![]() |
Goal Seek
Hi,
Below is an abstract of my payroll sheet. I know how to use goal seek to change Basic Salary so Net Salary equals Proposed Net Salary, my problem is that I have 800 lines to change, Is there any way I can repeat goal seek through macros or anything that can save me the hassel of doing it line by line? Basic Salary Allowance1 Gross salary Tax Net Salary Proposed Net Salary 1000 200 1200 120 1,080 1,400 2000 300 2,300 270 2,030 2,500 Thanks in advance -- tarig |
Goal Seek
It may be that you can rearrange the formulae to calculate ditectly, but you
haven't told us the formulae you are using. -- David Biddulph "Tarig" wrote in message ... Hi, Below is an abstract of my payroll sheet. I know how to use goal seek to change Basic Salary so Net Salary equals Proposed Net Salary, my problem is that I have 800 lines to change, Is there any way I can repeat goal seek through macros or anything that can save me the hassel of doing it line by line? Basic Salary Allowance1 Gross salary Tax Net Salary Proposed Net Salary 1000 200 1200 120 1,080 1,400 2000 300 2,300 270 2,030 2,500 Thanks in advance -- tarig |
Goal Seek
Repeating something using a macro is relatively easy. Just use a
Do-Until-Loop statement. However...I don't know what a goal seek is...and hence can't write up a code snippet for you....so maybe we can help each other...:-)...whats a goal seek? Something like this: RowValue = 0 Do Until RowValue = 800 RowValue = RowValue + 1 [Your required code here.] Loop "Tarig" wrote: Hi, Below is an abstract of my payroll sheet. I know how to use goal seek to change Basic Salary so Net Salary equals Proposed Net Salary, my problem is that I have 800 lines to change, Is there any way I can repeat goal seek through macros or anything that can save me the hassel of doing it line by line? Basic Salary Allowance1 Gross salary Tax Net Salary Proposed Net Salary 1000 200 1200 120 1,080 1,400 2000 300 2,300 270 2,030 2,500 Thanks in advance -- tarig |
Goal Seek
Here's one general outline:
Sub Demo() Dim R As Long 'Row For R = 1 To 10 Cells(R, 5).GoalSeek Cells(R, 6), Cells(R, 1) Next R End Sub Reads: Set the cell in Column 5 to equal the value in Columns 6, by changing the cell in Column 1. -- HTH Dana DeLouis "Tarig" wrote in message ... Hi, Below is an abstract of my payroll sheet. I know how to use goal seek to change Basic Salary so Net Salary equals Proposed Net Salary, my problem is that I have 800 lines to change, Is there any way I can repeat goal seek through macros or anything that can save me the hassel of doing it line by line? Basic Salary Allowance1 Gross salary Tax Net Salary Proposed Net Salary 1000 200 1200 120 1,080 1,400 2000 300 2,300 270 2,030 2,500 Thanks in advance -- tarig |
All times are GMT +1. The time now is 10:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com