• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Inventory Stock Take VBA

sealion1

Member
Hi,

I have created a spreadsheet that allows me to add in any new stock that is received in for my company.

We have three different shifts and I would like to show what is received in by each shift. Currently, all the data gets added to Sheet2 - but I would like the data to go onto the day shift tab, evening shift tab or crossover shift tab depending on what shift is selected.

Can anybody help me with this?

I have attached a copy of the file :) thank you!
 

Attachments

  • test.xlsm
    58.9 KB · Views: 22
it should be simple. something like this....

Sub test()
Dim irow As Integer
Dim obSheet As Worksheet
Dim sName As String

sName = [Name]
Set obSheet = Sheets(sName)

irow = obSheet.UsedRange.Rows.Count + 1
 
Hi dan_l - thanks for this!

Where would I put it into my code though? Could you possibly put an example down of how the last bit with sName & Set obSheet would look?

Thanks.
 
I'm having a bitch of a time opening your file and I'm not sure why.

Try this - like I say: it's dead simple and I never get style points
 

Attachments

  • badmacro.xlsm
    20.7 KB · Views: 17
Back
Top