Anyone any good with excel? (1 Viewer)

pete

chronic procrastinator
Staff member
Since 1999
Joined
Nov 14, 1999
Messages
63,140
Solutions
3
Location
iPanopticon
Website
thumped.com
I've a CSV file with 10,000+ rows. For the sake of simplicity lets say there are three columns in each row

Date
Counter
Textfield

The values in the textfield column in about 900 of the rows contain duplicates and I need some way of automatically finding and appending some standard text to the end these fields in the rows with the lowest counter AND the oldest date. Can this be done with a macro? Or some manipulation / comparison of additional counter columns?

Oh and in most cases there are just two duplicates, but some have between three and nine. I'm hoping that whatever voodoo used to find matching pairs can just be run N times until all dupes are gone.

So - anyone able to help?
 
This is a CSV dump from a MySQL database so if there's some MySQL magic that can be done without involving database dumps, excel & database imports that would be good also.
 
fuck all y'all i'm doing it by hand. almost halfway through and i want to put my fist through this monitor.
 
all done.

am now having one of those "I've made a terrible mistake" moments...
 
For future reference the counter one is easy enough
Sort by textfield, then by date. let's say the textfield column is A and you are working in col D
Keep the top row blank

=IF(A1=A2,D1+1,1)
That gives you the counter that resets each time

You can add another col to concatenate that to the textfield, or else do it all in one go
=IF(A1=A2,CONCATENATE(A1,"-",D1+1),CONCATENATE(A1,"-",1))

If it's sorted by textfield and then by date the same approach can be used to append the first date after the textfield changes to each one.

For example - if your textfield is A and date is in B - use C to hold the oldest date
With A2 as the active cell
=IF(A2=A1,C1,B2)
So if the textfield is the same as the row above, look to the roe above for the date, every time the textfield changes look left for the date.

Again just concatenate everything together in another column.
 
ok more a google sheets question but it'll probably end up being excel based.

I'm trying to make a little food calculator thing so I can figure out how roughly balanced i'm eating.

Was thinking I'd make one form generated sheet which would be like, all the data on bananas or honey or whatever per 100g, this i can do.


the second sheet I want to have which would be the general interface would be a list of drop downs in a column, and when you select something from the column it will fill the row. This is the bit I don't know what functions I should be using for.

Not sure I can make this vaguer.
 
Not really a solution to your specific problem, but have you considered just using an app like myfitnesspal or lifesum?
 
he came 3rd this time

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 

Users who are viewing this thread

Activity
So far there's no one here

21 Day Calendar

Lau (Unplugged)
The Sugar Club
8 Leeson Street Lower, Saint Kevin's, Dublin 2, D02 ET97, Ireland

Support thumped.com

Support thumped.com and upgrade your account

Upgrade your account now to disable all ads...

Upgrade now

Latest threads

Latest Activity

Loading…
Back
Top