#### ClimoC

##### Well-known Member

- Joined
- Aug 21, 2009

- Messages
- 584

What I need is for column X in Sheet2! to have a number plopped in it everytime this macro is run. The hard part has been done - it already identifies the next blank row based on a mandatory field. Now that I have the row and can copy and paste data into the appropriate fields at will, I now just need something that will assign a number into column X when it has found that row.

I also need the numbers to grow sequentially - can someone please edit this formula to include the auto-adding of these unique identifiers?

Thanks in Advance, you attractive-looking-geniuses...

C

Sub publish2()

With Worksheets("Sheet2")

.Visible = True

End With

Application.ScreenUpdating = False

Sheets("Sheet2").Select

Columns("E:E").Select

Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _

:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _

False).Activate

reviewrow = ActiveCell.Row

Range("Sheet2!E" & reviewrow) = Range("Sheet1!d4").Value

Range("Sheet2!D" & reviewrow) = Range("Sheet1!D5").Value

Range("Sheet2!I" & reviewrow) = Range("Sheet1!d9").Value

Range("Sheet2!J" & reviewrow) = Range("Sheet1!d11").Value

Range("Sheet2!k" & reviewrow) = Range("Sheet1!d13").Value

Range("Sheet2!s" & reviewrow) = Range("Sheet1!d15").Value

Range("Sheet2!c" & reviewrow) = Range("Sheet1!d17").Value

Range("Sheet2!f" & reviewrow) = Range("Sheet1!g15").Value

Range("Sheet2!l" & reviewrow) = Range("Sheet1!d21").Value

Range("Sheet2!u" & reviewrow) = Range("Sheet1!d24").Value

Range("Sheet2!n" & reviewrow) = Range("Sheet1!d29").Value

Range("Sheet2!q" & reviewrow) = Range("sheet1!d31").Value

Range("Sheet2!o" & reviewrow) = Range("sheet1!g29").Value

Sheets("Sheet1").Select

Range("D9:G9,D11:G11,D13:G13,D15,G15,D21,G21,D24:G27,D5,D6,D31,G29,D29").Clearcontents

Range("d4").Select

With Worksheets("Sheet2").Visible = False

End With

Application.ScreenUpdating = True

End Sub