Add .html to each single field value and add new field with 'custom_permalink' - excel

I have CSV file and I can view it in excel. Here is example data:
ID Product Name
75 dale-earnhardt-jr-adult-costume
77 dale-earnhardt-jr-adult-costume-2
79 plastic-jeweled-crown
81 dollar-ring
83 the-wizard-of-oz-shoe-covers-child
1) I need to add '.html' at the end of product name like dollar-ring.html
2) I want add new column with value 'custom_permalink'
Output should be like:
ID New Column Product Name
75 custom_permalink dale-earnhardt-jr-adult-costume.html
77 custom_permalink dale-earnhardt-jr-adult-costume-2.html
79 custom_permalink plastic-jeweled-crown.html
81 custom_permalink dollar-ring.html
83 custom_permalink the-wizard-of-oz-shoe-covers-child.html
I've 30K records and want to add this using some easy way of excel?

Open/import your CSV file in Excel. Say, it is now in columns A and B.
In cell C1 write =A1.
In cell D1 write custom_permalink.
In cell E1 write =B1&".html".
Select cells C1:E1 and fill the formula till the bottom of your data.
Copy and paste special columns C:E as values only.
Delete columns A:B.

In cell B2 of CSV file add the below formula.
=CONCATENATE(A1, ".html")
Select the range in column B and filldown formulas using shortcut key CTRL+D.

Related

Is it possible to have IF formula delete a row?

I have a formula that right now pulls and outputs on another sheet whether the B1 Cell is equal to “YES” then print A1 in the new sheets Cell I have the formula entered in, if it is not then it leaves the cell blank and this goes on for as many cells as needed.
Here is my formula
=IF((Sheet1!B1)=“YES”,Sheet!1A1,””)
I am wondering if there is a way to change the formula to where if it is not equal to “YES” then instead of leaving the Cell blank it deletes the entire row instead.
I know the final ,””) part of the formula is what I used to state the Cell will be blank. I’m just unaware if there is a function or anything I can input instead to state if not “YES” then delete the Row.
Example of what is happening:
If I have these entries in Sheet 1
A
B
1
85
YES
2
47
NO
3
74
YES
The output on Sheet 2 using my formula will be:
A
B
1
85
2
3
74
I am looking for it to look like this:
A
B
1
85
2
74
3
Thanks!

Choose next non-empty cell in Excel

I have a table (Table A) containing 96 rows with data in them. There's a second table (Table B) that references Table A. In Table B there is a calculation that either copies the data from Table A or puts "" because the data is outside of a specified range (e.g., IF(A1<500,A1,""). The end result in Table B is several rows without data in them.
I'd like to create a Table C that references Table B, but only copies rows with data in them. E.g., if the data in Table B looks like this:
465
461
168
46
187
198
48
I'd like Table C to look like this:
465
461
168
46
187
198
48
Is there way to do this with a formula?
Thanks! Nikki
Use this:
=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$20)/($A$1:$A$20<500),ROW(1:1))),"")
This will skip the blanks as it is copied down.
Select the range containing blank rows you want to remove.
Click Home > Find & Select > Go To Special.
In the Go To Special dialog box, check the Blanks option.
And then click OK, all of the entire blank rows are highlighted. Then click Home > Delete > Delete Sheet Rows, the blank rows have been deleted from the selected range.
You should try with this post:
https://www.extendoffice.com/documents/excel/2654-excel-dynamic-list-remove-blanks.html

Excel splitting one row into separate rows of a fixed number of colums

Here is a sample of the data I have in one row in an excel file. I would like to split it into multiple rows after every seven columns
15-Feb 20 783 175 105 $180 $973 15-Mar 31 900 58 145 $106 $140
to
15-Feb 20 783 175 105 $180 $973
15-Mar 31 900 58 145 $106 $140
You can use this formula:
=INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7))
drag/copy this formula across till row 7 and down as required.
Issue with this formula is it will return 0 if cell is blank.
So alternatively, you can check for cell blank condition and write formula as:
=IF(ISBLANK(INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7))),"",INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7)))
If you have a well defined and deterministic way to split the two halves (for instance, columns "A" to "D" is the first half, while columns "E" to "H" is the second), you can enter a formula in a different sheet like (this is pseudo-code; you will need to verify the syntax):
Cell "A1" of the new sheet: ='Other_Sheet'!A(round(row()/2)+1)
Cell "A2" of the new sheet: ='Other_Sheet'!E(round(row()/2)+1)
The indirect reference is made such that it will go to the next row in the source sheet every two rows in the new sheet.

Excel remove more than 2 duplicate records from a column

Excel has function to remove duplicates but what if i want only first 2 records of each value in a column.
E.g. Sheet
Email Value
abc#gmail.com 23
xyz#yahoo.com 24
sns#abc.com 75
abc#gmail.com 51
lkj#asd.com 85
abc#gmail.com 95
xyz#yahoo.com 52
uhk#asj.com 95
uhk#asj.com 42
Expected Result Sheet
Email Value
abc#gmail.com 23
xyz#yahoo.com 24
sns#abc.com 75
abc#gmail.com 51
lkj#asd.com 85
xyz#yahoo.com 52
uhk#asj.com 95
uhk#asj.com 42
Note that "abc#gmail.com 95" record which was third entry for the email id was removed. All other records has either one or two entries. No record is allowed for more than two entries. I have thousands of these in a sheet and need to only have first two entries of each email. Can anyone tell me how i can i delete more than 2 records as in above example?
create a helper column with the following formula:
Assuming "abc#gmail.com" is in cell A2, enter this formula in cell C2
=Countif($A$2:A2,A2)>2
This will result in a TRUE/FALSE value. Copy/Fill down the formula to the bottom of your list.
Since this formula returns TRUE for the first two instances of the email address, all of your FALSE values can be deleted from your worksheet.

matching multiple values from separate sheets in excel

I have two sheets of data I need to match and transfer values with.
First two columns 1A & 1B
Column 1A contains all unique numbers (these are invoice numbers that we bill out to our customers)
Column 1B contains revenues when we receive payment for these jobs.
second two columns 2A & 2B
I have started to scan our check reports and transfer the data into a simple two column excel sheet (2A & 2B) Column A contains invoice numbers that are also contained in column 1A, column 2B contains the data I want to be transferred into column 1B for each corresponding match between columns 1A & 2A.
I have done some digging and cannot seem to find a simple solution to my problem.
VLOOKUP is the solution.The formula to do this would go into sheet 1, Col B , Row 2 (Assuming you have a headers in row 1).
=VLOOKUP(A2, sheet2!A:B,2,false)
The formula works like so
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
-lookup_value = a cell you want to lookup
-table_array = a range of columns with the lookup column in col1
-index_num = the column you want to return as an int ( in this case column 2)
-range_lookup = should be false to ensure an EXACT match

Resources