Solved

Way to Auto populate a column index

Posted on 2013-05-30
2
238 Views
Last Modified: 2016-11-23
I'm trying to figure out a way to have a button where it takes a column and with the information automatically add a ampersand and a unique number down a column (example:
A2 = BING&1
A3 = BING&2
A4 = DELL&3
A5 = IBM&4

So the individual would just enter BING, DELL, OR IBM in column A and after a button is pressed it gives it an ampersand and a unique number. I tried to do a simple IF statement telling to do a concatenate of column A an Ampersand and then a unique number in another column if there is a value in column A. But of course I get a circular reference.
IdentifyingColumn.xlsm
0
Comment
Question by:Southern_Gentleman
2 Comments
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 500 total points
ID: 39208666
Hi,

You will need a temporary column, say, [F], that will hold the value of the corresponding value from column [A] &, the row number.

For example:
F1=A1&ROW()

However, in your workbook, the data starts on row 2, so:

F2=A2&ROW()

Then cell [F1] (or [F2]) would be copied down column [F] to the extent of the data in column [A].

The contents of column [F] would then be copied over the top of column [A] as values.

Column [F] would then be cleared or deleted.

Do you need help with such steps (in Microsoft Visual Basic for Applications code)?

BFN,

fp.
0
 

Author Closing Comment

by:Southern_Gentleman
ID: 39209763
Thanks BFN, I actually went ahead and did it the way of VBA.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now