EXCEL How to iterate and add iterator to double entries - regex

I have an Excel list which does contain a certain number of double entries.
eg.
enter image description here
What I want to do is to search each doublette and add an iterator to it. So that the result looks something like this:
enter image description here
I've absolutly no idea where to start with this.
Any ideas!?

Put this in B2:
=IF(A2=A1,A2&"."&COUNTIF($A$1:A2,A2)-1,A2)
And drag down. Let me know if it helps...

Thanks a lot to Black.Jack! You were right all along!
My own stupidity was in my way. ;) I am running a German version of Libre Office, which brings two subtle, but important changes. First conditions etc. must be named German!!! (as a colleague pointed out ;))
Secondly the parameters must be seperated by ; and not by , in Libreoffice...
So the working formula for a German Libre Office version is this one:
=WENN(A2=A1;A1&"."&ZĂ„HLENWENN($A$1:A2;A2)-1;A2)
again: Thank you very much Black.Jack. Wouldn't have figured it out without your help!!!

Related

IF/AND/OR/THEN in Excel

I'm stuck trying to crack an IF/THEN where a specific character is not in one column, and another does have a certain set of text. I'm starting to wonder if it can be done.
I've tried several juggled around versions of =If(AND(..., I've tried =IF(NOT(OR..., I've even tried breaking it apart with =IF(ISNUMBER(SEARCH... which really isn't right.
I'm looking for situations where AE2 does not contain "*/*", and B2 contains "*IND*".
The basic formula I keep coming back to is =IF(AND(AE2<>"*/*", B2="*IND*"), "DAF","") but this is showing all of the columns as DAF then, which isn't right. I feel like I'm close, but I'm missing some little critical thing.
Try this
=IF(AND(COUNTIF(AE2,"*/*")=0,COUNTIF(B2,"*IND*")=1),"DAF","")

Merging cells in openoffice deleting specific whitespace

Ok, so what I have is going to be 3 cells of data that I need to merge into a link to pictures in my store. What I am looking for is an easy way to do this without double clicking and cntl v pasting for 4x at 100+ lines per page...
Cell 1. Cell 2. Cell 3
Assets/ name. .jpg
Needs to be.... assets/name.jpg
This seems simple, but the problem is most of the names are 2 words and even the single word names when merged look like this...... assets/ name name .jpg
Giving me a space after/ and a space after the second name. If the "name" I am merging with has 2 or more parts I still need to keep those spaces intact or the link will not work the way it's set up currently. I may need to rename the pictures into 1 solid word just for linking purposes, but hoping to avoid an extra step.
Is there a way to merge and remove the spaces I need gone to create the link? I have done a couple pages the hard way, not fun when I have 200+ pages to do.
Any help is appreciated.
Thank you.
Jerry
It seems to me possible that an answer to a completely different Q may be of interest to you:
=TRIM(LOWER((A1))&TRIM(A2)&TRIM(A3))

Google Spreadsheets - IF with more that three arguments

I'm currently working an a very simple project management template.
The Idea is that after entering a start and end-date columns will show up as a very simplistic gantt chart (conditional formating).
Everything works fine, until "year" comes into consideration. Since it is a several years lasting project and we work with calenderweeks it is essential that the work package is only visualized in its specific year.
So I came up with the following (rough'n'dirty) formular (example from cell K3):
=and(if(K$2>=$F3;1;0);if(K$2<=$H3;1;0);if(or(right($E3;4)=K$1;1);(right(G3;4)=K1;1;0)))
This is the document: https://docs.google.com/spreadsheets/d/15F1uBnoHMuJqc_w0X04U5-ZCQ_6mgO_HJqvN5U28cog/edit?usp=sharing
Problem: GoogleSpreadsheets only alows three arguments with IF. But I do not know how to structure it otherwise...
Thankful for any suggestion!
Cheers,
Matt
This might be what you are looking for, ties the start week/ end week and year together for comparison.
=IF(AND(
(K$1&TEXT(K$2;"00")) >=(RIGHT($E$3;4)&TEXT($F$3;"00"));
(K$1&TEXT(K$2;"00")) <=(RIGHT($G$3;4)&TEXT($H$3;"00")))
;1;0)

Excel VBA help - run a series of regex find and replaces

I have a worksheet that has become very complex. On it, there is a sheet in which a user will paste data about once every other day. The data will always be in the same format, and is provided to us in an exact way only. Once pasted in, I need a way for a very average user of excel to be able to press a button (or key combo, or whatever) and excel will run a series of about 8-10 regex find and replaces. All of these will be on column A of the data. Once those are all run, a simple formula would be run on every cell C2 and below in column C. Those columns should be reduced by 80% - =C2*.8
This should all be done with minimal user input if possible.
Would anybody much more versed in regex or excel know a better direction for me to look for a proper start? What resources would be recommended to best accomplish this?
If you're multiplying by some factor, then regexp substitution will be overkill. Excel is very good at multiplying an array of numbers by 0.8.
Search for "Excel paste factor" and you'll get an easy explanation, such as this one.
I might record a macro for your less-experienced users and hope that the previous user pasted the numbers in with absolute perfection.

Comparing two documents

I have two very large lists. They both were originally in excel, but the larger one is a list of emails (about 160,000) of them with other information like their name and address etc. And the smaller one is a list of just 18,000 emails.
My question is what would be the easiest way to get rid of all 18,000 rows from the first document that contain the email addresses from the second?
I was thinking regex or maybe there is another application I can use? I have tried searching online but it seems like there isn't much specific to this. I also tried notepad++ but it freezes when I try to compare these large files.
-Thank You in Advance!!
Good question. One way I would tackle this is making a C++ program [you could extrapolate the idea to the language of your choice; You never mentioned which languages you were proficient in] that read each item of the smaller file into a vector of strings. First, of course, use Excel to save the files as CSV instead of XLS or XLSX, which will comma-separate the values so you can work with them easier. For the larger list, "Save As" a copy of just email addresses, deleting the other rows for now.
Then, you could open the larger list and use a nested loop to check if you should output to an output file. Something like:
bool foundMatch=false;
for(int y=0;y<LargeListVector.size();y++) {
for(int x=0;x<SmallListVector.size();x++) {
if(SmallListVector[x]==LargeListVector[y]) foundMatch=true;
}
if(!foundMatch) OutputVector.append(LargeListVector[y]);
foundMatch=false;
}
That might be partially pseudo-code, but do you get the idea?
So I read a forum post at : Here
=MATCH(B1,$A$1:$A$3,0)>0
Column B would be the large list, with the 160,000 inputs and column A was my list of things I needed to delete of 18,000.
I used this to match everything, and in a separate column pasted this formula. It would print out either an error or TRUE. If the data was in both columns it printed out true.
Then because I suck with excel, I threw this text into Notepad++ and searched for all lines that contained TRUE (match case, because in my case some of the data had the word true in it without caps.) I marked those lines, then under search, bookmarks, I removed all lines with bookmarks. Pasted that back into excel and voila.
I would like to thank you guys for helping and pointing me in the right direction :)