Excel VBA OR Formula - excel

I am wanting to set up a macro or formula to automatically remove duplicates in a column. Column c is where the data is inputted, this then populates in column a but column A needs to contain none of the duplicates. My column B is checking A against C to see how many times A criteria's appear in B and this all feeds through to my front end sheet.
So like i say, A needs to populate with C data but remove duplicates in A at the same time.
Many thanks for any help

Related

Inserting Multiple Blank Cells Below Cells Containing Data Series

I have a column of data (column A) and I want to spread the data out in column C, so that there are three blank cells below each new number. In the case of duplicate numbers, one extra blank cell would be added. I cannot devise a formula that will accomplish this.
In the spirit of a picture is worth a thousand words, here is a link showing how I would like column C to appear, as derived from column A:
enter image description here

Highlight a Cell in Excel Based on Identical Contents in a Column with Varying Contents

I am trying to figure out if it is possible to use a formula with conditional formatting or a VBA macro to highlight a cell based on a cell with identical contents in another column, with varying data.
To explain more thoroughly, let's say I have column A, with unique content in each row, rows 1-280. Each row is formatted to be a string of text, such as "12E00" or "97EBC." I also have column T, which is based on imported data, and may contain some of, but not all of, nor in the same row, the data from column A. It also starts at row 9, not row 1. This is repeated on 47 different tabs, with differing row contents on different tabs (some may have 1-280, others may have 1-160).
Is there some conditional formatting formula/macro (with an explanation of the working components of possible, so that I can learn myself and educate my supervision on the inner workings) that would allow me to highlight any of the cells in column A that have the same text string shown somewhere in column T? Additionally, keeping in mind that I'm checking every row in column A against column T and that column T will only contain some of the text strings in column A.
I assume there is a better way to accomplish this.
But if I understood the question correctly, then try using: =ISNUMBER(MATCH(cell,column,0))
I would then make a column next to Column A for each sheet you want to check.
Example table, with a column for each sheet checked, and a column for checking if any sheets matched. Matched cells are highlighted.
47 columns might be too much to, therefore I used Column B to do:
=OR(Table1[#[sheetName]:[otherSheetName]])
Each column have the formula: =ISNUMBER(MATCH([#[Column A]],INDIRECT(C$1&"!T:T"),0)) (C$1 is pointing to the column's header row)
Utilizing INDIRECT() the column will always look in column T in the sheet with the same name as the column header.
The highlighting is done with these conditional formatting rules

Excel Sorting issue with cell references

I am having an issue where sorting on a sheet is causing an issue on another sheet where the data is referenced.
Here is an example to make it easy to understand:
Sheet 1!A1 has a list of random names, Sheet2!A1's formula is "=Sheet1!A1". I am adding new columns to Sheet2 such as B, C and D.
When I sort the values of Column A in Sheet 1, I see the sort order in Sheet2!A reflects the change, but not the columns B,C and D. How can I tie the Columns B,C and D, to column A in Sheet2?
Thank you in advance,
Gokalp
Convert sheet 2 to a table and then use it to sort your data. Highlight the data and then click on Insert on the ribbon at the top and click table. You may need to make a header row. Then sorting will be done on sheet 2.

Number rows in Column A based on values in Column B

Here's what I'm trying to do using Excel 2010 VBA:
I have a list of course names in column B. Each time the course name changes I've inserted two blank rows. What I need to do is number the rows in column A, stop numbering when I hit a blank row and then restart the numbering when I get a new course name in column B. Any assistance is greatly appreciated.
Easier than VBA. Put this formula in A2, and copy down
=IF(ISBLANK(B2),"",MAX(A$1:A1)+1)

Copy paste line items in Sheet B to filtered rows in Sheet A in Excel?

I have Sheet A with 500 line items.
Suppose I have applied filter to show line items "2","44","68" and so on
From Another Sheet i want to select some rows and paste them in these filtered rows.If I paste,they get copied on line items 2,3,4,5, and so one instead of 2,44,68,etc
Can Someone please help me.I tried paste special,but it has same issue.
I also tried selecting the area to paste,then clicking alt + ; but the data also gets copied into unfiltered items.
This is more of an approach solution then a coding solution. I assume that the current order of the rows must be maintained.
Add a column to to your sheet, use autocomplete to number the current order of the rows.
Sort by your filter value(s) - if you have multiple values, just add another column and put a single unique value in it
Paste your values
Sort by you current order column, to restore the orginal order
If it is with same sheet you can make the two columns adjacent by hiding other columns in between. You can block the data and drag it to next column.
For eg.
I have column A, B, C, D.
Let A be ZIP CODE & Column D is 'Shipping Service'
I need to have ZIP CODE(Column A) with '95035' to have Shipping Service as 'Fedex'
Filter the column A with '95035'
Hide the column B & C
Drag the values from A to D directly where the values are copied to the adjacent cells.
Note: If you use two separate sheets copy the columns entirely to the sheet 1 adjacent to the column you want to copy and again take copy the entire column back to Sheet 2. This will work if both sheet have same number of rows.
Thanks,
Karthik
The easiest coding solution is to use vlookup http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx
On sheet1 from Sheet2 use
=VLOOKUP(B3,Sheet2!A:B,2,FALSE)

Resources