?
Solved

Way to Auto populate a column index

Posted on 2013-05-30
2
Medium Priority
?
243 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

777 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