# If x, autonumber, if y x value .1, x value.2 etc

1. ## If x, autonumber, if y x value .1, x value.2 etc

hy guys,
I have this code ``Please Login or Register  to view this content.``
If i put "x" in column B from Sheet1, Sheet2, Sheet3 then in column A is allocated a unique number and is copied in sheet Master. Is possible to implement in this code next request :if i put "y" in column B, then in column A is allocated "x" value.1 (x.1,x.2,x.3 etc) ant copy in Master?

i will give an example in sheet3  Register To Reply

2. ## Re: If x, autonumber, if y x value .1, x value.2 etc

this is the good attachment  Register To Reply

3. ## Re: If x, autonumber, if y x value .1, x value.2 etc

It is possible?  Register To Reply

4. ## Re: If x, autonumber, if y x value .1, x value.2 etc

Would you explain in words exactly what you want to achieve. By that I don't mean describe what your macro is doing, it may not the the most efficient way, I mean explain from first principles.

All I can see at the moment is that you want a master list which contains all the data from the other sheets which would be a trivial copy and paste macro.  Register To Reply

5. ## Re: If x, autonumber, if y x value .1, x value.2 etc

If i put "x" in column B from Sheet1, Sheet2, Sheet3 then in column A is allocated a unique number and is copied in sheet Master. This make the code. Would i want is : Is possible to implement in this code next request :if i put "y" in column B, then in column A is allocated "x" value.1 (x.1,x.2,x.3 etc) ant copy in Master?  Register To Reply

6. ## Re: If x, autonumber, if y x value .1, x value.2 etc

some ideas?  Register To Reply

7. ## Re: If x, autonumber, if y x value .1, x value.2 etc  Register To Reply

8. ## Re: If x, autonumber, if y x value .1, x value.2 etc  Register To Reply

9. ## Re: If x, autonumber, if y x value .1, x value.2 etc

It seems an unnecessarily complicated way of populating a Mother sheet. Unless I'm missing something obvious all the values from the daughter sheets could be copied and pasted to the mother sheet.

As for entering a y I'd have another section of code which detected the y entry and worked out the highest x number and the highest suffix, incremented the suffix by 1 and entered it into Col A.

It's not clear to me whether you ever change an existing number or whether you always add one to the bottom of the list.  Register To Reply

10. ## Re: If x, autonumber, if y x value .1, x value.2 etc

i always add one to the bottom of the list..if you have another solution, is ok  Register To Reply

11. ## Re: If x, autonumber, if y x value .1, x value.2 etc

no idea? another solution?  Register To Reply

12. ## Re: If x, autonumber, if y x value .1, x value.2 etc

nobody can't help me?  Register To Reply

13. ## Re: If x, autonumber, if y x value .1, x value.2 etc

some ideas?  Register To Reply

14. ## Re: If x, autonumber, if y x value .1, x value.2 etc

https://streamable.com/u47j1

that is all i want  Register To Reply

15. ## Re: If x, autonumber, if y x value .1, x value.2 etc

My code has can to define unique for number in all worksheet
And can define sub number for y

Step - 1
'now your duty is convert to workbook_change

Step - 2
For copy all worksheet to worksheet master workbook
You input code to sheet master in events
Private Sub Worksheet_activate()
'copy all worksheet
End sub

'done  Register To Reply

16. ## Re: If x, autonumber, if y x value .1, x value.2 etc

what code?  Register To Reply

17. ## Re: If x, autonumber, if y x value .1, x value.2 etc

i found the solution to allocate x.1. x.2, but how can to rezise sheet master with y value? ``Please Login or Register  to view this content.``  Register To Reply

18. ## Re: If x, autonumber, if y x value .1, x value.2 etc

why multiply my data in master?  Register To Reply

19. ## Re: If x, autonumber, if y x value .1, x value.2 etc

some ideas?  Register To Reply

20. ## Re: If x, autonumber, if y x value .1, x value.2 etc

i found the solution. i put in master sheet ``Please Login or Register  to view this content.``  Register To Reply