Excel/Set Cell value based on new sheet
thank you so much for your great respond.
I inserted the code provided by you :
Dim mysht As Worksheet
Set mysht = Worksheets("Master")
Dim n As Long
n = 4
While Len(mysht.Cells(n, 1).Value) > 0
ActiveSheet.Name = mysht.Cells(n, 1).Value
n = n + 1
and it was work perfectly, my second issue was:
after creating a new sheet for each employee (have his name), I want cell (d7) in each new sheet to have the same employee name as well. and cell (d5) to have his subsidiary name.
then after calculating his bonus, the result should go back to master sheet. I inserted two screenshot for both sheets to better clarify of my issue.
Thanks & Regards
My eyesight isn't what it once was (!) so I have problems with the images on this system - however, to set a value on the new sheet
ActiveSheet.range("D7).value = "whatever you want"
would be a method I would use - for the bonus calculation, are it would work the other way round
or similar - hopefully this gives you what you need - but let me know if I can help further.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here