Creating a new risk number

Pasty

Board Regular
Joined
Mar 26, 2007
Messages
96
Hi there I was wondering if anyone could point me in the right direction for this problem.

I a list of risk numbers which I am using in a code that will filter actions and run reports off and send them automatically. Each report will have a specific ID number and I was wondering if there was an easy way to generate these.

They will all be stored in a seperate sheet which the user will never see and what I was wanting it to do was to look at the current risk numbers and then add the next one on (with a description of what it relates to next to it) for example if the last ID was Risk 6 it would add Risk 7 at the end of them (N.B. all of them will be in ascending order as I am running a vlookup on them)

Any help would be greatly appreciated.

Regards,

Matt
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If your list of risk numbers is in column A on sheet2 then this will add the next one on:
Code:
Dim limit As Long
Dim lastnumber As String
limit = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
With WorksheetFunction
    lastnumber = Val(Right(Cells(limit, 1), Len(Cells(limit, 1)) - .Find(" ", Cells(limit, 1))))
    Cells(limit + 1, 1) = "Risk " & lastnumber + 1
End With
 
Upvote 0

Forum statistics

Threads
1,214,406
Messages
6,119,330
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top