Auto fill serial number with Macro (Situation question)

Alexlin

New Member
Joined
Sep 29, 2018
Messages
15
Hi guys, me again, a VBA beginner.

I have the information below:- Column B1:E1 are the description. Then we copy the data from other sources based on these description (FilexxNAME, Nature, Place, Tool). We dunno the total number of the series. It can be 6 series (like example below), or it can be thousands of series. Some cells under the descriptions might be blank, but we still take it into account if other columns have value.

..FilexxNAME Nature Place Tool
1 dsdfsdsfsdfs (Blank) sdfsfd sdfs
2 sdfsdfsdfdfd sdfsdfds sdfd (Blank)
3 dsfsdfsdfdsf (Blank) sddsf (Blank)
4 (Blank)...... asdasdd adfdf dsfsd
5 (Blank)...... afsdfssd dsfds (Blank)
6 (Blank)...... sdfdsffd sddfff (Blank)
My question is how to auto fill the serial number with Macro based on the above situation?

What if I dun wanna use 1,2,3,4,5...etc., but using a,b,c,d,e,f,g....etc.?

Thanks a lot!
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi Alexlin,
what's the serial number you talk about? Is that the numbers 1,2,3,4,5,6 etc? If so, you could e.g. use the =ROW()-1 function to get a unique number. If you want letters and don't have over 16k rows:
=LEFT(ADDRESS(1,ROW()-1,4),LEN(ADDRESS(1,ROW()-1,4))-1)
Hope that helps,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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