auto-generate number based on date

mychi11

Board Regular
Joined
May 11, 2020
Messages
95
Office Version
  1. 2016
Platform
  1. Windows
Hi folks,

I was wondering if it is possible to auto generate sequential number based on the date in excel while trying to skip the number based on conditions. For example, I have different process A, B, C. I only want to auto generate number specifically for process A only based on date. I don't know if I have made this sounds too complicated. But yeah. thanks all for your time if you're reading this question.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Put the cursor in the cell that gets the number,run the macro. (Put a shortcut on the immediate toolbar)
Adjust Offset cell that has the codes A,B,C.

Code:
Sub makeNum()
If activecell.offset(0,1).value ="A" then activecell.value = format(now(),"yymmddhhnnss")
End sub
 
Upvote 0
Hi ranman, thank you for your prompt response. I am not very good with excel. I don't really know how to go about it. Do you mind to explain the steps in more details please
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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