How to Copy formats across sheets in excel - excel

I have two sheets:
They both have the same values. However, sheet1 has different number formats. Is there a way to apply all these to all columns in sheet2 apart from manually going one by one and changing the number format. This becomes unbearable once the number of columns grows.

1- Select the cell with the formatting you want to copy.
2- Select Home > Format Painter.
3- Drag to select the cell or range you want to apply the formatting to.
4- Release the mouse button and the formatting should now be applied.

Related

Excel - Merge Multiple Columns Cells into a single Cell

I have an Excel spreadsheet in the usual fashion. That is to say, rows and columns. So if there are seven rows, each column has seven values. I want to take one of these columns and make it extend down across the whole spreadsheet. TRANSFORMATION (LOGIC) used to have seven values, now it has one. How do I do this? EDIT: By "down across", I mean the column should have just one cell.
In order to achieve the merging of your cells, select the desired cell range on your sheet and then you will click the "Merge" button found on the Home tab in Excel.
Note that if the content is already in the cells it will take the value from the first cell which has content in it already, so best to copy your values and such out first if you would like to preserve them.

Excel, how to prevent data from incrementing but also not copy formatting

I am trying to drag the bottom right corner downwards to copy some data and it always increments my numbers that I want to copy. If I select copy cells in the auto fill options then it copies the numbers properly but also copies the formatting, but if I select fill without formatting it increments the numbers. I want both. My first cell has a strong border above it that I don't want every cell to have. However my data is in semi small increments of the same problem so copying the first cell once then dragging would be way to inefficient. Thanks for the help.
Original data example
Using copy cells, right numbers wrong formatting
Use the following formula in the any one of the columns you are not using and drag it down to the end of data. Then copy the result to your column E as values. If your helper column is N then:
=IF(E3<>"",E3,N2)
What I usually do in these situations is separate the values from the formatting.
make a copy of the column you want to edit (either adjacent to it,
or outside the table you're editing).
On the new column - use copy cells in the autofill menu, or
otherwise complete the values according to your needs.
paste the new column back on the original column As values.
Delete the new column

Extract excel cell values of coloured cells

Want to copy all values of coloured cells in different sheets. Attaching the image for reference where I want to extract all values which have coloured cells Excel sheetsample
If you need this operation to be performed only once, you do not need to use vba. It would be easier to put filter on the top row (ctrl+shift+L), click the dropdown on the column and use filter by colour. Then you can easily mark all and copy/paste.

Excel: Copy formatted data fast

This is a excel question:
I have a excel sheet which is heavily formatted, that is, the column widths have been changed and the cells have color formatting. I have filtered this sheet on certain fields. Now, I want to copy this filtered data to another excel sheet with all the formatting.
So for the only way possible seems like to copy the formatting first using paint formatter one by one for each column but that is very tedious. Is there a simple way to do this?
Copy what you want, then paste special three times into your target range: values, columns widths, formats.
Edit: Changed order, putting widths before formats. Otherwise wrapped cells will incorrectly change row height.
To copy the cell values and the formatting use the Camera Tool. This is available on the Command Tab of the customise menu. This Camera Tool copies the cells as a graphic and is dynamic.

Excel Conditional Formatting 3-color over one row applied to many rows

I've got some excel spreadsheets with a couple hundred to couple thousand rows. Each row represents a set of measurements taken at one second intervals.
I want to use the 3 color conditional formatting for each row. I can setup a single row for the 3 color by setting the "Applies to" to something like:
'Table1'!$B$2:$M$2
However, if i try to copy the format and then apply it to multiple rows, (say B3:M400), it will treat the entire block (all cells from B3 through M400) as a single conditional format, so each cell is colored according to all of the other cells. What i'm looking for is a way to apply the 3 color conditional formatting to each row individually over many many rows.
For example, in the image linked here: http://electriceptor.files.wordpress.com/2012/04/screen-shot-2012-04-30-at-11-53-36-pm.png (sorry, i'm too new to post images), each of the rows has an individual 3 color format that i manually applied to each row.
However, if i copy a single row and paste the format into that same block of 7 rows, it looks like this image: http://electriceptor.files.wordpress.com/2012/04/screen-shot-2012-04-30-at-11-56-42-pm.png:
Note how the formatting is applied to the entire block.
Is there a way to apply the conditional formatting for each row individually without doing each row manually?
Since 3-color conditional formatting doesn't accept relative references (no matter how much you try to 'trick' Excel with INDIRECT, ADDRESS, etc.), your best bet is to use the method here (example was for 2-color formatting): https://superuser.com/questions/350378/excel-2007-conditional-formatting-so-that-each-row-shows-low-values-yellow-hig
This is the same as using the format painter on each individual row (using the format painter on multiple rows puts you back to square one where it looks at all the rows).
Sub NewCF()
Range("B1:M1").Copy
For Each r In Selection.Rows
r.PasteSpecial (xlPasteFormats)
Next r
Application.CutCopyMode = False
End Sub
Also, there's no limit to the number of conditional formatting rules (at least in Excel 2010), but the more you have, the more potential there is for a negative impact on performance. You'll just have to try it and see. In the worst-case scenario, I would make 3-10 (or however many you can stand to make) individual rules based on a formula to create a "gradient", but this may be just as cpu-intensive.
I've just tried using the fill handle on a cell with conditional formatting e.g. =COUNTIF(C2,"Yes")=1 then applies to $A2 and then selected that cell and dragged the fill handle - it adds the conditional formatting to each row automatically! jippee!

Resources