close

I have a worksheet with data in a column as follows

uid=xvdcfrd,ou=people,dc=xxxxx
uid=sdsdsd,ou=people,dc=xxxxx
uid=fhjetyv,ou=people,dc=xcxcx

Each of the above lines is in a single cell in the column. I need to
start at the top cell and retrieve the text following the first = sign
and grab the text to the first comma (in cell one in the above example,
I want xvdcfrd). After retrieving the text I want to copy/move it to
another column (If I delete the formula, I want to keep the retrieved
data unless there is a way to write the data that I retrieve in the
same column that I am performing this function on). I need the code to
loop through the entire column and grab that data from each cell.

Thanks in advance...--
Keenman
------------------------------------------------------------------------
Keenman's Profile: www.excelforum.com/member.php...oamp;userid=14220
View this thread: www.excelforum.com/showthread...hreadid=536246Hi!

One way: (assuming every entry starts with uid= and has at least one comma):

=LEFT(SUBSTITUTE(A1,LEFT(A1,4),quot;quot;),FIND(quot;,quot;,A1)-5)

Copy down as needed.

Not sure what you intend to do about deleting the formulas but you might try
this:

Select the range of formulas
Goto Editgt;Copy
Then Editgt;Paste Specialgt;Values

This will convert the formulas to constants.

Then you could delete the original data BUT before you do that make sure the
formulas extracted the correct data!

Biff

quot;Keenmanquot; gt; wrote in
message ...
gt;
gt; I have a worksheet with data in a column as follows
gt;
gt; uid=xvdcfrd,ou=people,dc=xxxxx
gt; uid=sdsdsd,ou=people,dc=xxxxx
gt; uid=fhjetyv,ou=people,dc=xcxcx
gt;
gt; Each of the above lines is in a single cell in the column. I need to
gt; start at the top cell and retrieve the text following the first = sign
gt; and grab the text to the first comma (in cell one in the above example,
gt; I want xvdcfrd). After retrieving the text I want to copy/move it to
gt; another column (If I delete the formula, I want to keep the retrieved
gt; data unless there is a way to write the data that I retrieve in the
gt; same column that I am performing this function on). I need the code to
gt; loop through the entire column and grab that data from each cell.
gt;
gt; Thanks in advance...
gt;
gt;
gt; --
gt; Keenman
gt; ------------------------------------------------------------------------
gt; Keenman's Profile:
gt; www.excelforum.com/member.php...oamp;userid=14220
gt; View this thread: www.excelforum.com/showthread...hreadid=536246
gt;

Biff,

Worked great!!! Thanks...Biff Wrote:
gt; Hi!
gt;
gt; One way: (assuming every entry starts with uid= and has at least one
gt; comma):
gt;
gt; =LEFT(SUBSTITUTE(A1,LEFT(A1,4),quot;quot;),FIND(quot;,quot;,A1)-5)
gt;
gt; Copy down as needed.
gt;
gt; Not sure what you intend to do about deleting the formulas but you
gt; might try
gt; this:
gt;
gt; Select the range of formulas
gt; Goto Editgt;Copy
gt; Then Editgt;Paste Specialgt;Values
gt;
gt; This will convert the formulas to constants.
gt;
gt; Then you could delete the original data BUT before you do that make
gt; sure the
gt; formulas extracted the correct data!
gt;
gt; Biff
gt;
gt; quot;Keenmanquot; gt; wrote
gt; in
gt; message ...
gt; gt;
gt; gt; I have a worksheet with data in a column as follows
gt; gt;
gt; gt; uid=xvdcfrd,ou=people,dc=xxxxx
gt; gt; uid=sdsdsd,ou=people,dc=xxxxx
gt; gt; uid=fhjetyv,ou=people,dc=xcxcx
gt; gt;
gt; gt; Each of the above lines is in a single cell in the column. I need
gt; to
gt; gt; start at the top cell and retrieve the text following the first =
gt; sign
gt; gt; and grab the text to the first comma (in cell one in the above
gt; example,
gt; gt; I want xvdcfrd). After retrieving the text I want to copy/move it
gt; to
gt; gt; another column (If I delete the formula, I want to keep the
gt; retrieved
gt; gt; data unless there is a way to write the data that I retrieve in the
gt; gt; same column that I am performing this function on). I need the code
gt; to
gt; gt; loop through the entire column and grab that data from each cell.
gt; gt;
gt; gt; Thanks in advance...
gt; gt;
gt; gt;
gt; gt; --
gt; gt; Keenman
gt; gt;
gt; ------------------------------------------------------------------------
gt; gt; Keenman's Profile:
gt; gt; www.excelforum.com/member.php...oamp;userid=14220
gt; gt; View this thread:
gt; www.excelforum.com/showthread...hreadid=536246
gt; gt;--
Keenman
------------------------------------------------------------------------
Keenman's Profile: www.excelforum.com/member.php...oamp;userid=14220
View this thread: www.excelforum.com/showthread...hreadid=536246You're welcome. Thanks for the feedback!

Biff

quot;Keenmanquot; gt; wrote in
message ...
gt;
gt; Biff,
gt;
gt; Worked great!!! Thanks...
gt;
gt;
gt; Biff Wrote:
gt;gt; Hi!
gt;gt;
gt;gt; One way: (assuming every entry starts with uid= and has at least one
gt;gt; comma):
gt;gt;
gt;gt; =LEFT(SUBSTITUTE(A1,LEFT(A1,4),quot;quot;),FIND(quot;,quot;,A1)-5)
gt;gt;
gt;gt; Copy down as needed.
gt;gt;
gt;gt; Not sure what you intend to do about deleting the formulas but you
gt;gt; might try
gt;gt; this:
gt;gt;
gt;gt; Select the range of formulas
gt;gt; Goto Editgt;Copy
gt;gt; Then Editgt;Paste Specialgt;Values
gt;gt;
gt;gt; This will convert the formulas to constants.
gt;gt;
gt;gt; Then you could delete the original data BUT before you do that make
gt;gt; sure the
gt;gt; formulas extracted the correct data!
gt;gt;
gt;gt; Biff
gt;gt;
gt;gt; quot;Keenmanquot; gt; wrote
gt;gt; in
gt;gt; message ...
gt;gt; gt;
gt;gt; gt; I have a worksheet with data in a column as follows
gt;gt; gt;
gt;gt; gt; uid=xvdcfrd,ou=people,dc=xxxxx
gt;gt; gt; uid=sdsdsd,ou=people,dc=xxxxx
gt;gt; gt; uid=fhjetyv,ou=people,dc=xcxcx
gt;gt; gt;
gt;gt; gt; Each of the above lines is in a single cell in the column. I need
gt;gt; to
gt;gt; gt; start at the top cell and retrieve the text following the first =
gt;gt; sign
gt;gt; gt; and grab the text to the first comma (in cell one in the above
gt;gt; example,
gt;gt; gt; I want xvdcfrd). After retrieving the text I want to copy/move it
gt;gt; to
gt;gt; gt; another column (If I delete the formula, I want to keep the
gt;gt; retrieved
gt;gt; gt; data unless there is a way to write the data that I retrieve in the
gt;gt; gt; same column that I am performing this function on). I need the code
gt;gt; to
gt;gt; gt; loop through the entire column and grab that data from each cell.
gt;gt; gt;
gt;gt; gt; Thanks in advance...
gt;gt; gt;
gt;gt; gt;
gt;gt; gt; --
gt;gt; gt; Keenman
gt;gt; gt;
gt;gt; ------------------------------------------------------------------------
gt;gt; gt; Keenman's Profile:
gt;gt; gt; www.excelforum.com/member.php...oamp;userid=14220
gt;gt; gt; View this thread:
gt;gt; www.excelforum.com/showthread...hreadid=536246
gt;gt; gt;
gt;
gt;
gt; --
gt; Keenman
gt; ------------------------------------------------------------------------
gt; Keenman's Profile:
gt; www.excelforum.com/member.php...oamp;userid=14220
gt; View this thread: www.excelforum.com/showthread...hreadid=536246
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()