Solved

Way to Auto populate a column index

Posted on 2013-05-30
2
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

730 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