How to get it

N

Nathan

Dear Sir/Mam,
EH152 raja
EH153 Veera

I have like this data.Then i want to add
one more name that time when i come down how i can creat the code no.
atomatically increase example like this

EH152 raja
EH153 Veera
EH154
 
J

Jacob Skaria

Try this formula and copy down as required. Adjust 152 to suit your
requirement.

="EH"&ROW(A1)+152

If this post helps click Yes
 
P

p45cal

Nathan;488780 said:
Dear Sir/Mam,
EH152 raja
EH153 Veera

I have like this data.Then i want to add
one more name that time when i come down how i can creat the code no.
atomatically increase example like this

EH152 raja
EH153 Veera
EH154

Perhaps OTT but you could paste the following into the sheet's cod
module (reachable by right-clicking its tab and choosing 'View code..')
It works when you change something in column B and adds a new code i
column A, but only if there isn't one there already. It uses Autofil
based on the cell in column A of the row immediately above the ro
you're changing.Private Sub Worksheet_Change(ByVa
Target As Range)
If Not Intersect(Target, Columns(2)) Is Nothing Then
If IsEmpty(Cells(Target.Row, "A")) Then
Cells(Target.Row - 1, "A").AutoFill Destination:=Cells(Target.Row
1, "A").Resize(2), Type:=xlFillDefault
End If
End If
End Su
 
A

Ashish Mathur

Hi,

Assuming that EH152 and EH153 are in range C3:C4, select the two and drag
down the fill handle (the square box at the bottom right of the selection).
The last number will increment by 1.

Hope this helps.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
B

Bernd P

Hello,

Or select the cells containing "EH152" and "EH153" and double click
the bottom right corner of this selection.

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top