GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   MS EXCEL Gurus Step Inside (https://gfy.com/showthread.php?t=818208)

qxm 03-28-2008 12:21 AM

MS EXCEL Gurus Step Inside
 
OK, this might not take an excel guru........this is what I'm trying to do:

I have a list of items listed in columns, each cell of that column has data formatted like this:

COLUMN:

data1, data2, data3
data4, data5, data6

I need a macro or something similar which would allow me to erase everything found after a comma and only keep the first set of data ....so the output should be:

COLUMN:

data1
data4

Any ideas anyone???? :helpme:helpme:helpme

GrouchyAdmin 03-28-2008 12:47 AM

Just import as a CSV, click A1 at the top, ctrl-c, go to page 2, paste?

If you want to use something like TextPad, you could just 'replace, regex, ',.*$', nothing, replace all.

Or, you could just abuse unix if it's not xls format. Don't need nothin fancy.
cut -d, -f1 < file

However, I won't pretend to have tried to make an excel macro in years.

qxm 03-28-2008 01:12 AM

ahhh the 'replace, regex, ',.*$' thing worked like a charm.............

I was thinking I would have to create a macro .... haven't done one in years either.....but this worked just fine........thanks m8!!!!!

GrouchyAdmin 03-28-2008 01:31 AM

No worries. I <3 regex.

CunningStunt 03-28-2008 02:38 AM

Data >> text to columns ;-)


All times are GMT -7. The time now is 09:00 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123