Copy colors in excel

See all How-To Articles

This tutorial demonstrates how to copy the color of a cell in Excel and Google Sheets.

copy cell color 5

Copy Cell Color

Color With Format Painter

  1. To copy the cell color, select the cell with the color. Then in the Ribbon, go to Home, and choose Format Painter.

copy cell color 1

  1. Then, select the cell where you want to copy the color.

copy cell color 2

As a result, the cell color is pasted.

copy cell color 3

To use Format Painter within a macro, see VBA – Format Painter.

Copy With Paste Special

  1. Right-click on the cell with the color you want to copy and, from the drop-down menu, choose Copy (or use the CTRL + C shortcut).

copy cell color 8

  1. Then select the cell where you want to paste the color, right-click on it and from the drop-down menu, choose Paste Special.

copy cell color 9

  1. The Paste Special window appears. Under the Paste section, click on Formats. Then click on OK to finish.

copy cell color 10

As a result, the cell color is pasted.

copy cell color 11

Note: Using this method, it is not possible to copy only the color. All cell formatting is pasted (text font and color, bolding, etc.). Therefore, if you want to copy only a color, you shouldn’t have any other formatting in that cell apart from the color.

copy cell color 12

Copy Cell Color in Google Sheets

copy cell color 17

  1. To copy the cell color, select the cell with the color, right-click on it and from the drop-down menu, choose Copy (or use the CTRL + C shortcut).

copy cell color 14

  1. Right-click on the cell where you want to paste the color. In the drop-down menu, click on Paste special, then choose Paste format only.

copy cell color 15

As a result, the cell color is pasted.

copy cell color 16

Содержание

  1. How to Copy Cell Color in Excel & Google Sheets
  2. Copy Cell Color
  3. Color With Format Painter
  4. Copy With Paste Special
  5. Copy Cell Color in Google Sheets
  6. How to copy color of the conditional formatting cell to another excel file
  7. 4 Answers 4
  8. How to Copy Formatting In Excel?
  9. Copy the Formatting to a Single Cell
  10. Copy the Formatting to a Range of Cells
  11. Copy the Formatting Using Paste Special
  12. Copy the Formatting Using the Fill Handle
  13. Copy cell styles from another workbook
  14. Need more help?

How to Copy Cell Color in Excel & Google Sheets

This tutorial demonstrates how to copy the color of a cell in Excel and Google Sheets.

Copy Cell Color

Color With Format Painter

  1. To copy the cell color, select the cell with the color. Then in the Ribbon, go to Home, and choose Format Painter.

  1. Then, select the cell where you want to copy the color.

As a result, the cell color is pasted.

To use Format Painter within a macro, see VBA – Format Painter.

Copy With Paste Special

  1. Right-click on the cell with the color you want to copy and, from the drop-down menu, choose Copy (or use the CTRL + C shortcut).

  1. Then select the cell where you want to paste the color, right-click on it and from the drop-down menu, choose Paste Special.

  1. The Paste Special window appears. Under the Paste section, click on Formats. Then click on OK to finish.

As a result, the cell color is pasted.

Note: Using this method, it is not possible to copy only the color. All cell formatting is pasted (color of text, font, bolding, etc.). Therefore, if you want to copy only a color, you shouldn’t have any other formatting in that cell apart from the color.

Copy Cell Color in Google Sheets

  1. To copy the cell color, select the cell with the color, right-click on it and from the drop-down menu, choose Copy (or use the CTRL + C shortcut).

  1. Right-click on the cell where you want to paste the color. In the drop-down menu, click on Paste special, then choose Paste format only.

Источник

How to copy color of the conditional formatting cell to another excel file

On one sheet I have a data which has conditional formatting color.

I want to copy and paste that into another file, I was able to paste value, column width etc. but I couldn’t paste the color from the conditional formatting.

I researched and the suggestion was to paste it in word and then back to excel but that ruins my excel row and column formatting.

How to do that? Is it possible?

4 Answers 4

I would like to suggest you two possible methods. One is Non-programming & Second is Programming(VBA Macro).

Non-Programming Method:

  1. Open both Workbooks.
  2. Copy a cell from the original Workbook’s Sheet, (from where you want to Copy the Conditional Formatting) to an unused position in the destination Workbook’s sheet.
  3. Open the Manage Rules option of Conditional Formatting.
  4. Select Show formatting rules for This Worksheet.
  5. For each Rule, adjust the Applies to match the range you require.
  6. Click the Range button to the right of the Applies to.
  7. Click-drag-select from the top left cell to the bottom right cell.
  8. Click the Range button to return to the Conditional Rules Manager.
  9. Click OK or Apply to get the result.

Programming Method:

At Source File press Alt+F11 to open the VB Editor.

Copy & paste this code as Standard module.

Note:

  1. You can edit Worbook & Sheet name as per your need.
  2. Adjust cell references for the Copied Range as needed.

Источник

How to Copy Formatting In Excel?

When working with data in Excel, you will often format data (such as color the cells or make them bold or give a border), to make these stand out.

And if you have to do this for many cells or range of cells, instead of doing it manually, you can do it once and then copy and paste the formatting.

In this tutorial, I will show you how to copy formatting in Excel. You can easily do it by using the Format painter option, using the Fill handle, or Paste special.

Table of Contents

Copy the Formatting to a Single Cell

We’ll first see how to copy a formatting to a single cell in Excel. Let’s say that you have cell A2 formatted as an accounting number, with red background and white font color.

In Cell C2 we have the plain number without any format.

  1. Select a formatted cell that has the formatting that you want to copy (A2 in our example)
  2. Click on Format Painter in the Home tab. This will change the cursor into a paintbrush with a plus icon

  1. Click on a cell where you want to copy a format (C2)

Whenever you select a cell and choose Format Painter in the toolbar, the mouse cursor turns into a white cross with a brush.

This is how you know that the formatting is copied to the clipboard and you can paste it where you want.

Just the way we copied the formatting from one to another in the same sheet. you can also copy formatting to another sheet or another workbook. Simply select the cell from where you want to copy the formatting, enable format painter, select the sheet/workbook where you want to paste it, and select the cells in the destination sheet.

With Format Painter, you can easily copy the following formatting:

  • Cell background-color
  • Font size and color
  • Font (including number format)
  • Font characteristics (bold, italics, underline)
  • Text alignment and orientation
  • Cell borders (type, size, color)
  • Custom Number Formatting
  • Conditional Formatting

Personally. I find it a huge time saver to copy conditional formatting from one cell to another in the same sheet or other sheets. Excel is smart enough to adjust the rules in conditional formatting in case you’re using custom formulas.

Copy the Formatting to a Range of Cells

Just like you can copy the formatting from one cell to another cell, you can also copy it to a range of cells.

In this case, you need to select a range of cells on which you want to apply the format painter.

Suppose you have a dataset as shown below where you want to copy the formatting from cell A2 to the range of cells in C2:C7

  1. Select a formatted cell (A2)
  2. Click on Format Painter in the Home tab
  3. Select a range of cells where you want to copy a format (C2:C7)

As a result, the format from A2 is copied to the selected range.

PRO TIP: When you click on the Format Paint icon, it allows you to format a cell or range of cells only once. Once you’re done, it’s disabled. So if you want to copy formatting to two ranges of cells, you will have to enable format painter twice. Alternatively, when you double-click on the Format Paint icon, it remains enabled and you can copy formatting to multiple cells or ranges.

Copy the Formatting Using Paste Special

When you copy and paste cells in Excel, you noticed that there are usually multiple paste options, such as: Paste text, Paste values, etc.

One of these options is Paste formatting.

This allows you to copy only the formatting from cells to cells.

  1. Select and right-click a cell from which you want to copy the formatting (A2)
  2. Click Copy (or use the keyboard shortcut CTRL+C).

  1. Select a range of cells to which you want to copy the formatting (C2:C7);
  2. Right-click anywhere in the selected range;
  3. Click the arrow next to Paste Special;
  4. Choose the icon for formatting.

The result is the same as using the Format painter.

You can also notice that all formatting that you copied by Format painter is also copied using the Paste special option.

Just like format painter, you can also use the Paste Special technique to paste formatting on the cells or range of cells in the same sheet or other sheet/workbook.

Pro Tip: If you have to copy the formatting from a cell to multiple cells that are scattered through the worksheet, you can use the paste special technique to copy formatting to one cell, and then repeat the process by using the F4 key. So copy the formatting once, then select another cell and press F4, and it will repeat your last action (which was to paste the formatting).

Copy the Formatting Using the Fill Handle

As you probably already know, the fill handle is the little black cross that appears when you position a cursor in the right bottom corner of the cell (as shown below).

This cursor allows you to copy a cell (or range of cells) down the rows.

Apart from copying the cell values, the fill handle also allows you to copy the formatting.

Let’s say that you have a list of numbers in column A, where the first value in the list (A2) is formatted, while other values (A3:A7) are not formatted at all.

What I want is to copy the formatting from cell A2 to all the cells below it.

Below are the steps to do this:

  1. Position the cursor in the right bottom corner of a cell from which you want to copy the formatting (A2) until the black cross (fill handle) appears;

  1. Drag the fill handle down to the end of the range which we want to format (A7). If you want to copy the cell to the end of the range (until the first blank cell in the range), just double-click the fill handle.

  1. When you drop the cursor, by default both value and formatting will be copied to the range. Now, you need to click on the AutoFill Options icon next to the end of the range and choose Fill Formatting Only.

Now, you can see that values are not changed, while the formatting is copied to the whole range.

While I have shown how to use the Fill Handle to copy formatting for one column only, you can use it the same way for the data in a row of data that spans across multiple rows and columns.

One drawback of using the fill handle is that your data needs to be in the same column or row where you have the cell from which you are copying the formatting. This also means that you cannot use this method to copy the formatting to cells or range of cells that are in another sheet or workbook.

So these are some of the methods you can use to copy formatting from one cell to another cell or range of cells in Excel.

I hope you found this tutorial useful!

Other Excel tutorials you may also like:

Источник

Copy cell styles from another workbook

When you create new cell styles in a workbook, you may want to make them available in other workbooks. You can copy the cell styles from that workbook to another workbook.

Open the workbook that contains the cell styles that you want to copy.

Open the workbook that you want to copy the styles into.

On the Home tab, in the Styles group, click the More button next to the cell styles box that contains previews of styles.

Note: If you are using Excel 2007, on the Home tab, in the Styles group, click Cell Styles.

Click Merge Styles.

In the Merge Styles dialog box, in the Merge styles from box, click the workbook that contains the styles that you want to copy, and then click OK.

If both workbooks contain styles that have identical names, you must indicate whether you want to merge these styles by doing the following:

To replace the styles in the active workbook with the copied styles, click Yes.

To keep the styles in the active workbook as they are, click No.

Note: Excel displays this message only once, regardless of the number of pairs of identical style names.

Tip: When you move or copy a worksheet from one workbook to another workbook, all the styles that are used on that worksheet are also copied to that workbook. For more information, see Move or copy a worksheet.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

To copy the cell color, select the cell with the color, right-click on it and from the drop-down menu, choose Copy (or use CTRL + C shortcut). 2. After that, right-click on the cell where you want to paste the color.

Contents

  • 1 How do I copy cell color from conditional formatting?
  • 2 How do I automatically link a cell color to another cell in Excel?
  • 3 How do you copy a cell color?
  • 4 What is the shortcut to copy cell color in Excel?
  • 5 How do you copy just the color in Excel?
  • 6 How do you highlight a cell if another cell contains text?
  • 7 How do you highlight cells based on other cells?
  • 8 How do I copy highlighted cells in Excel?
  • 9 How do you copy cell formatting in Excel?
  • 10 How do I copy and paste formatted cells in Excel?
  • 11 How do you quickly highlight cells in Excel?
  • 12 What is the keyboard shortcut to fill a cell in Excel?
  • 13 Is there a keyboard shortcut for highlighting?
  • 14 What is Ctrl D in Excel?
  • 15 How do I change the color of a cell based on another cell color?
  • 16 Can you do an IF statement in Excel based on text color?
  • 17 How do I highlight color in Excel based on cell value?
  • 18 How do you paste over filtered cells?
  • 19 How do you copy formatting?
  • 20 How do I copy a cell color in Word?

How do I copy cell color from conditional formatting?

Copy Conditional Formatting Using Format Painter

  1. Select the cell (or range of cells) from which you want to copy the conditional formatting.
  2. Click the Home tab.
  3. In the Clipboard group, click on the Format Painter icon.
  4. Select all the cells where you want the copied conditional formatting to be applied.

How do I automatically link a cell color to another cell in Excel?

In the menu, choose Format – Conditional Formatting. In the Conditional Formatting box, choose Formula Is. In the text box, enter the cell reference of the FIRST table (eg C4=”4+”), do not enter any $ symbols. Click the Format button and select the background fill to match the one in the first table.

How do you copy a cell color?

To copy the cell color, select the cell with the color, right-click on it and from the drop-down menu, choose Copy (or use CTRL + C shortcut). 2. After that, right-click on the cell where you want to paste the color. In the drop-down menu, click on Paste special, then choose Paste format only.

What is the shortcut to copy cell color in Excel?

Here is a quick guide:

  1. With the cells selected, press Alt+H+H.
  2. Use the arrow keys on the keyboard to select the color you want. The arrow keys will move a small orange box around the selected color.
  3. Press the Enter key to apply the fill color to the selected cells.

How do you copy just the color in Excel?

Select the cell from which colour you want to copy, click format painter on Home tab, then select the column on which to apply the colour. Alternatively you can also use paste special. Copy the cell, select the column on which to apply the colour, open Paste Special on Home tab and select Formatting.

How do you highlight a cell if another cell contains text?

Select the cells you want to apply conditional formatting to. Click the first cell in the range, and then drag to the last cell. Click HOME > Conditional Formatting > Highlight Cells Rules > Text that Contains. In the Text that Contains box, on the left, enter the text you want highlighted.

How do you highlight cells based on other cells?

Excel formulas for conditional formatting based on cell value

  1. Select the cells you want to format.
  2. On the Home tab, in the Styles group, click Conditional formatting > New Rule…
  3. In the New Formatting Rule window, select Use a formula to determine which cells to format.
  4. Enter the formula in the corresponding box.

How do I copy highlighted cells in Excel?

Follow these steps:

  1. Select the cells that you want to copy For more information, see Select cells, ranges, rows, or columns on a worksheet.
  2. Click Home > Find & Select, and pick Go To Special.
  3. Click Visible cells only > OK.
  4. Click Copy (or press Ctrl+C).

How do you copy cell formatting in Excel?

Copy cell formatting

  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.

How do I copy and paste formatted cells in Excel?

Using Copy and Paste for Formatting

  1. Select the cell or cells whose format you wish to copy.
  2. Press Ctrl+C or press Ctrl+Insert.
  3. Select the cell or cell range into which you want the formats pasted.
  4. Choose Paste Special from the Edit menu.
  5. Choose the Formats radio button.
  6. Click on OK.

How do you quickly highlight cells in Excel?

Click the cell, and then drag across the contents of the cell that you want to select in the formula bar. Press F2 to edit the cell, use the arrow keys to position the insertion point, and then press SHIFT+ARROW key to select the contents.

What is the keyboard shortcut to fill a cell in Excel?

Fill formulas into adjacent cells

  1. Select the cell with the formula and the adjacent cells you want to fill.
  2. Click Home > Fill, and choose either Down, Right, Up, or Left. Keyboard shortcut: You can also press Ctrl+D to fill the formula down in a column, or Ctrl+R to fill the formula to the right in a row.

Is there a keyboard shortcut for highlighting?

Adding highlighting: Select the text you want to highlight, then press Ctrl+Alt+H. Removing highlighting: Select the highlighted text, then press Ctrl+Alt+H.

What is Ctrl D in Excel?

Ctrl+D in Excel and Google Sheets
In Microsoft Excel and Google Sheets, pressing Ctrl + D fills and overwrites a cell(s) with the contents of the cell above it in a column. To fill the entire column with the contents of the upper cell, press Ctrl + Shift + Down to select all cells below, and then press Ctrl + D .

How do I change the color of a cell based on another cell color?

To do this, select the range of cells that you wish to apply the conditional formatting to. In this example, we’ve selected cells E14 to E16. Then select the Home tab in the toolbar at the top of the screen. Then in the Styles group, click on the Conditional Formatting drop-down and select Manage Rules.

Can you do an IF statement in Excel based on text color?

Steve would like to create an IF statement (using the worksheet function) based on the color of a cell. The closest non-macro solution is to create a name that determines colors, in this manner:Select cell A1.

How do I highlight color in Excel based on cell value?

Select the range of cells, the table, or the whole sheet that you want to apply conditional formatting to. On the Home tab, click Conditional Formatting, point to Highlight Cells Rules, and then click Text that Contains. In the box next to containing, type the text that you want to highlight, and then click OK.

How do you paste over filtered cells?

Re: Paste TO visible cells only in a filtered cells only

  1. copy the formula or value to the clipboard.
  2. select the filtered column.
  3. hit F5 or Ctrl+G to open the Go To dialog.
  4. Click Special.
  5. click “Visible cells only” and OK.
  6. hit Ctrl+V to paste.

How do you copy formatting?

How to copy format easy and quickly

  1. Select the text with the formatting to copy.
  2. Press Ctrl+Shift+C to copy the formatting of the selected text.
  3. Select the text to which you want to apply the copied formatting.
  4. Press Ctrl+Shift+V to apply the formatting to the selected text.

How do I copy a cell color in Word?

Copying Fill Color in a Table

  1. Select the row that is already filled with the desired color.
  2. Display the Home tab of the ribbon.
  3. Click the down-arrow to the right of the Shading tool, in the Paragraph group.
  4. Click on More Colors.
  5. Click OK.
  6. Select the other rows in the table whose background color you want to change.

On one sheet I have a data which has conditional formatting color.

I want to copy and paste that into another file, I was able to paste value, column width etc. but I couldn’t paste the color from the conditional formatting.

I researched and the suggestion was to paste it in word and then back to excel but that ruins my excel row and column formatting.

How to do that? Is it possible?

sample image

Ahmed Ashour's user avatar

Ahmed Ashour

2,3102 gold badges14 silver badges21 bronze badges

asked Sep 19, 2018 at 8:31

Paracsys's user avatar

1

I would like to suggest you two possible methods. One is Non-programming & Second is Programming(VBA Macro).

Non-Programming Method:

  1. Open both Workbooks.
  2. Copy a cell from the original Workbook’s
    Sheet
    , (from where you want to Copy the
    Conditional Formatting) to an unused position
    in the destination Workbook’s sheet.
  3. Open the Manage Rules option of
    Conditional Formatting.
  4. Select Show formatting rules for This
    Worksheet.
  5. For each Rule, adjust the Applies to match
    the range you require.
  6. Click the Range button to the right of the
    Applies to.
  7. Click-drag-select from the top left cell to
    the bottom right cell.
  8. Click the Range button to return to the Conditional Rules Manager.
  9. Click OK or Apply to get the
    result.

Programming Method:

  1. At Source File press Alt+F11 to
    open the VB Editor.

  2. Copy & paste this code as Standard
    module.

    Sub CopyFormat()
    Application.DisplayAlerts = False
    Dim wbSource As Workbook
    Set wbSource = Workbooks.Open(Filename:="source.xlsm", UpdateLinks:=3)
    wbSource.Sheets(1).Range("A1:H100").Copy
    Selection.PasteSpecial _ 
    Paste:=xlPasteValues
    Selection.PasteSpecial _ 
    xlPasteFormats
    
    wbSource.Close
    Application.DisplayAlerts = True
    End Sub
    

Note:

  1. You can edit Worbook & Sheet name as
    per your need.
  2. Adjust cell references for the Copied
    Range as needed.

answered Sep 19, 2018 at 9:43

Rajesh Sinha's user avatar

Rajesh SinhaRajesh Sinha

8,8926 gold badges15 silver badges35 bronze badges

0

If you do not need the formula for the conditional formatting, if you copy it to MS Word and back to Excel the color should be copied as well.

Albin's user avatar

Albin

8,8296 gold badges45 silver badges83 bronze badges

answered Aug 19, 2019 at 9:40

Vladimir Rejnoch's user avatar

0

I found a dead easy solution to this problem.

  1. Copy the cells with the results of conditional formatting that you want to duplicate in another place.

  2. Paste into an OpenOffice Calc spreadsheet (I used build 4.1.5) as Formatted — RTF. The formatting is still there, but OpenOffice apparently discards the conditions that created the formatting in the first place.

  3. Now simply copy and paste into Excel.

  4. Crack open the champagne.

This works with Excel files thousands of lines long.

answered Feb 12, 2021 at 3:20

Chris Brown's user avatar

Copy paste as html into a new instance of Excel might be the easiest way.
You can open a new instance of Excel by Right-click on Excel icon > Press and hold the ALT key > click Excel 201* > continue to press the ALT key until you receive the prompt «Do you want to start a new instance of Excel». Then select YES.

answered Sep 7, 2022 at 7:20

Sandra's user avatar

1

When working with data in Excel, you will often format data (such as color the cells or make them bold or give a border), to make these stand out.

And if you have to do this for many cells or range of cells, instead of doing it manually, you can do it once and then copy and paste the formatting.

In this tutorial, I will show you how to copy formatting in Excel. You can easily do it by using the Format painter option, using the Fill handle, or Paste special.

Copy the Formatting to a Single Cell

We’ll first see how to copy a formatting to a single cell in Excel. Let’s say that you have cell A2 formatted as an accounting number, with red background and white font color. 

In Cell C2 we have the plain number without any format.

excel copy the formatting of a cell initial data
  1. Select a formatted cell that has the formatting that you want to copy (A2 in our example)
  2. Click on Format Painter in the Home tab. This will change the cursor into a paintbrush with a plus icon
Excel format painter
  1. Click on a cell where you want to copy a format (C2)
formatting has been copied from one cell to another

Whenever you select a cell and choose Format Painter in the toolbar, the mouse cursor turns into a white cross with a brush.

This is how you know that the formatting is copied to the clipboard and you can paste it where you want.

Just the way we copied the formatting from one to another in the same sheet. you can also copy formatting to another sheet or another workbook. Simply select the cell from where you want to copy the formatting, enable format painter, select the sheet/workbook where you want to paste it, and select the cells in the destination sheet.

With Format Painter, you can easily copy the following formatting:

  • Cell background-color
  • Font size and color
  • Font (including number format)
  • Font characteristics (bold, italics, underline)
  • Text alignment and orientation
  • Cell borders (type, size, color)
  • Custom Number Formatting
  • Conditional Formatting

Personally. I find it a huge time saver to copy conditional formatting from one cell to another in the same sheet or other sheets. Excel is smart enough to adjust the rules in conditional formatting in case you’re using custom formulas.

Copy the Formatting to a Range of Cells

Just like you can copy the formatting from one cell to another cell, you can also copy it to a range of cells.

In this case, you need to select a range of cells on which you want to apply the format painter.

Suppose you have a dataset as shown below where you want to copy the formatting from cell A2 to the range of cells in C2:C7

Data to copy formatting from cell to range
  1. Select a formatted cell (A2)
  2. Click on Format Painter in the Home tab
  3. Select a range of cells where you want to copy a format (C2:C7)
Apply format painter on the entire range of cells

As a result, the format from A2 is copied to the selected range.

resulting dataset where range of cells have the copied formatting

PRO TIP: When you click on the Format Paint icon, it allows you to format a cell or range of cells only once. Once you’re done, it’s disabled. So if you want to copy formatting to two ranges of cells, you will have to enable format painter twice. Alternatively, when you double-click on the Format Paint icon, it remains enabled and you can copy formatting to multiple cells or ranges.

Copy the Formatting Using Paste Special

When you copy and paste cells in Excel, you noticed that there are usually multiple paste options, such as: Paste text, Paste values, etc. 

One of these options is Paste formatting. 

This allows you to copy only the formatting from cells to cells.

  1. Select and right-click a cell from which you want to copy the formatting (A2)
  2. Click Copy (or use the keyboard shortcut CTRL+C).
Right-click and copy formatting from the cell
  1. Select a range of cells to which you want to copy the formatting (C2:C7);
  2. Right-click anywhere in the selected range;
  3. Click the arrow next to Paste Special;
  4. Choose the icon for formatting.
Paste formatting only

The result is the same as using the Format painter.

You can also notice that all formatting that you copied by Format painter is also copied using the Paste special option.

Just like format painter, you can also use the Paste Special technique to paste formatting on the cells or range of cells in the same sheet or other sheet/workbook.

Pro Tip: If you have to copy the formatting from a cell to multiple cells that are scattered through the worksheet, you can use the paste special technique to copy formatting to one cell, and then repeat the process by using the F4 key. So copy the formatting once, then select another cell and press F4, and it will repeat your last action (which was to paste the formatting).

Also read: How to Copy and Paste in Excel Without Changing the Format?

Copy the Formatting Using the Fill Handle

As you probably already know, the fill handle is the little black cross that appears when you position a cursor in the right bottom corner of the cell (as shown below).

Fill Handle in selection

This cursor allows you to copy a cell (or range of cells) down the rows.

Apart from copying the cell values, the fill handle also allows you to copy the formatting.

Let’s say that you have a list of numbers in column A, where the first value in the list (A2) is formatted, while other values (A3:A7) are not formatted at all.

Dataset where only the first cell is formatted

What I want is to copy the formatting from cell A2 to all the cells below it.

Below are the steps to do this:

  1. Position the cursor in the right bottom corner of a cell from which you want to copy the formatting (A2) until the black cross (fill handle) appears;
Select the cell from which you want to copy the formatting
  1. Drag the fill handle down to the end of the range which we want to format (A7). If you want to copy the cell to the end of the range (until the first blank cell in the range), just double-click the fill handle.
Apply formatting to all cells below using fill handle
  1. When you drop the cursor, by default both value and formatting will be copied to the range. Now, you need to click on the AutoFill Options icon next to the end of the range and choose Fill Formatting Only.
Select fill formatting only option

Now, you can see that values are not changed, while the formatting is copied to the whole range.

Resulting data where all cells are now formatted

While I have shown how to use the Fill Handle to copy formatting for one column only, you can use it the same way for the data in a row of data that spans across multiple rows and columns.

One drawback of using the fill handle is that your data needs to be in the same column or row where you have the cell from which you are copying the formatting.  This also means that you cannot use this method to copy the formatting to cells or range of cells that are in another sheet or workbook.

So these are some of the methods you can use to copy formatting from one cell to another cell or range of cells in Excel.

I hope you found this tutorial useful!

Other Excel tutorials you may also like:

  • Using Conditional Formatting with OR Criteria in Excel
  • How to Format Phone Numbers in Excel
  • How to Highlight Every Other Row in Excel (Conditional Formatting & VBA)
  • How to Copy Multiple Sheets to a New Workbook in Excel
  • How to Create Barcodes in Excel
  • How to Autofill Dates in Excel (Autofill Months/Years)
  • How to Bold Text using VBA in Excel
  • Shortcut to Paste without Formatting in Excel
  • How to Change Theme Colors in Excel?
  • How to Remove Conditional Formatting in Excel? (5 Easy Ways)
  • How to Remove Table Formatting in Excel?
  • Copy and Paste shortcuts in Excel

Asked
8 years, 3 months ago

Viewed
4k times

Sometimes when I copy and paste from one workbook to another, the destination color scheme looks very odd. How can I copy the color scheme from one workbook to another

asked Dec 18, 2014 at 16:21

gordon613's user avatar

Open VBA and type the following (changing the names of the workbook as appropriate)

workbooks("DestinationWorkbook.xlsx").Colors=workbooks("SourceWorkbook.xlsx").Colors

answered Dec 18, 2014 at 16:21

gordon613's user avatar

gordon613gordon613

2,70811 gold badges51 silver badges79 bronze badges

  • #2

Copy your range of cells and then use paste special and you should find formats there which will give you what you want based on your question, if there is more to this then you will have to give clear questions.

Trevor

  • #4

What I have done here is created a couple of macros to see if this can advance your request

First here is the colour pallete index options which show the main colours and there equivalent numbers

Sheet1

<TABLE style=»BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt» border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style=»WIDTH: 30px; FONT-WEIGHT: bold»><COL style=»WIDTH: 64px»><COL style=»WIDTH: 64px»></COLGROUP><TBODY><TR style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold»><TD> </TD><TD>A</TD><TD>B</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>1</TD><TD style=»BACKGROUND-COLOR: #000000″> </TD><TD style=»TEXT-ALIGN: right»>1</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>2</TD><TD> </TD><TD style=»TEXT-ALIGN: right»>2</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>3</TD><TD style=»BACKGROUND-COLOR: #ff0000″> </TD><TD style=»TEXT-ALIGN: right»>3</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>4</TD><TD style=»BACKGROUND-COLOR: #00ff00″> </TD><TD style=»TEXT-ALIGN: right»>4</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>5</TD><TD style=»BACKGROUND-COLOR: #0000ff»> </TD><TD style=»TEXT-ALIGN: right»>5</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>6</TD><TD style=»BACKGROUND-COLOR: #ffff00″> </TD><TD style=»TEXT-ALIGN: right»>6</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>7</TD><TD style=»BACKGROUND-COLOR: #ff00ff»> </TD><TD style=»TEXT-ALIGN: right»>7</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>8</TD><TD style=»BACKGROUND-COLOR: #00ffff»> </TD><TD style=»TEXT-ALIGN: right»>8</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>9</TD><TD style=»BACKGROUND-COLOR: #800000″> </TD><TD style=»TEXT-ALIGN: right»>9</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>10</TD><TD style=»BACKGROUND-COLOR: #008000″> </TD><TD style=»TEXT-ALIGN: right»>10</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>11</TD><TD style=»BACKGROUND-COLOR: #000080″> </TD><TD style=»TEXT-ALIGN: right»>11</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>12</TD><TD style=»BACKGROUND-COLOR: #808000″> </TD><TD style=»TEXT-ALIGN: right»>12</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>13</TD><TD style=»BACKGROUND-COLOR: #800080″> </TD><TD style=»TEXT-ALIGN: right»>13</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>14</TD><TD style=»BACKGROUND-COLOR: #008080″> </TD><TD style=»TEXT-ALIGN: right»>14</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>15</TD><TD style=»BACKGROUND-COLOR: #c0c0c0″> </TD><TD style=»TEXT-ALIGN: right»>15</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>16</TD><TD style=»BACKGROUND-COLOR: #808080″> </TD><TD style=»TEXT-ALIGN: right»>16</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>17</TD><TD style=»BACKGROUND-COLOR: #9999ff»> </TD><TD style=»TEXT-ALIGN: right»>17</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>18</TD><TD style=»BACKGROUND-COLOR: #993366″> </TD><TD style=»TEXT-ALIGN: right»>18</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>19</TD><TD style=»BACKGROUND-COLOR: #ffffcc»> </TD><TD style=»TEXT-ALIGN: right»>19</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>20</TD><TD style=»BACKGROUND-COLOR: #ccffff»> </TD><TD style=»TEXT-ALIGN: right»>20</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>21</TD><TD style=»BACKGROUND-COLOR: #660066″> </TD><TD style=»TEXT-ALIGN: right»>21</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>22</TD><TD style=»BACKGROUND-COLOR: #ff8080″> </TD><TD style=»TEXT-ALIGN: right»>22</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>23</TD><TD style=»BACKGROUND-COLOR: #0066cc»> </TD><TD style=»TEXT-ALIGN: right»>23</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>24</TD><TD style=»BACKGROUND-COLOR: #ccccff»> </TD><TD style=»TEXT-ALIGN: right»>24</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>25</TD><TD style=»BACKGROUND-COLOR: #000080″> </TD><TD style=»TEXT-ALIGN: right»>25</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>26</TD><TD style=»BACKGROUND-COLOR: #ff00ff»> </TD><TD style=»TEXT-ALIGN: right»>26</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>27</TD><TD style=»BACKGROUND-COLOR: #ffff00″> </TD><TD style=»TEXT-ALIGN: right»>27</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>28</TD><TD style=»BACKGROUND-COLOR: #00ffff»> </TD><TD style=»TEXT-ALIGN: right»>28</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>29</TD><TD style=»BACKGROUND-COLOR: #800080″> </TD><TD style=»TEXT-ALIGN: right»>29</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>30</TD><TD style=»BACKGROUND-COLOR: #800000″> </TD><TD style=»TEXT-ALIGN: right»>30</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>31</TD><TD style=»BACKGROUND-COLOR: #008080″> </TD><TD style=»TEXT-ALIGN: right»>31</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>32</TD><TD style=»BACKGROUND-COLOR: #0000ff»> </TD><TD style=»TEXT-ALIGN: right»>32</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>33</TD><TD style=»BACKGROUND-COLOR: #00ccff»> </TD><TD style=»TEXT-ALIGN: right»>33</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>34</TD><TD style=»BACKGROUND-COLOR: #ccffff»> </TD><TD style=»TEXT-ALIGN: right»>34</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>35</TD><TD style=»BACKGROUND-COLOR: #ccffcc»> </TD><TD style=»TEXT-ALIGN: right»>35</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>36</TD><TD style=»BACKGROUND-COLOR: #ffff99″> </TD><TD style=»TEXT-ALIGN: right»>36</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>37</TD><TD style=»BACKGROUND-COLOR: #99ccff»> </TD><TD style=»TEXT-ALIGN: right»>37</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>38</TD><TD style=»BACKGROUND-COLOR: #ff99cc»> </TD><TD style=»TEXT-ALIGN: right»>38</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>39</TD><TD style=»BACKGROUND-COLOR: #cc99ff»> </TD><TD style=»TEXT-ALIGN: right»>39</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>40</TD><TD style=»BACKGROUND-COLOR: #ffcc99″> </TD><TD style=»TEXT-ALIGN: right»>40</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>41</TD><TD style=»BACKGROUND-COLOR: #3366ff»> </TD><TD style=»TEXT-ALIGN: right»>41</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>42</TD><TD style=»BACKGROUND-COLOR: #33cccc»> </TD><TD style=»TEXT-ALIGN: right»>42</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>43</TD><TD style=»BACKGROUND-COLOR: #99cc00″> </TD><TD style=»TEXT-ALIGN: right»>43</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>44</TD><TD style=»BACKGROUND-COLOR: #ffcc00″> </TD><TD style=»TEXT-ALIGN: right»>44</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>45</TD><TD style=»BACKGROUND-COLOR: #ff9900″> </TD><TD style=»TEXT-ALIGN: right»>45</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>46</TD><TD style=»BACKGROUND-COLOR: #ff6600″> </TD><TD style=»TEXT-ALIGN: right»>46</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>47</TD><TD style=»BACKGROUND-COLOR: #666699″> </TD><TD style=»TEXT-ALIGN: right»>47</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>48</TD><TD style=»BACKGROUND-COLOR: #969696″> </TD><TD style=»TEXT-ALIGN: right»>48</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>49</TD><TD style=»BACKGROUND-COLOR: #003366″> </TD><TD style=»TEXT-ALIGN: right»>49</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>50</TD><TD style=»BACKGROUND-COLOR: #339966″> </TD><TD style=»TEXT-ALIGN: right»>50</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>51</TD><TD style=»BACKGROUND-COLOR: #003300″> </TD><TD style=»TEXT-ALIGN: right»>51</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>52</TD><TD style=»BACKGROUND-COLOR: #333300″> </TD><TD style=»TEXT-ALIGN: right»>52</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>53</TD><TD style=»BACKGROUND-COLOR: #993300″> </TD><TD style=»TEXT-ALIGN: right»>53</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>54</TD><TD style=»BACKGROUND-COLOR: #993366″> </TD><TD style=»TEXT-ALIGN: right»>54</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>55</TD><TD style=»BACKGROUND-COLOR: #333399″> </TD><TD style=»TEXT-ALIGN: right»>55</TD></TR><TR style=»HEIGHT: 18px»><TD style=»TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt»>56</TD><TD style=»BACKGROUND-COLOR: #333333″> </TD><TD style=»TEXT-ALIGN: right»>56</TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1″ target=»_blank»> Excel Jeanie HTML 4

Next is the macro which I used
Public Sub ColorTable()
Dim i As Integer
For i = 1 To 56
Range(«A» & i).Interior.ColorIndex = i
Range(«B» & i).Value = i
Next i
End Sub

Having done this I have then used a simple macro to request the index number for a particular cell via an inputbox

Sub color1()
Dim i As Integer
i = InputBox(«Enter the colour number»)
Range(«h1»).Interior.ColorIndex = i

End Sub

I hope this can help. Perhaps record a macro that will help find the colour index number and see if this can be adapted to activecell or range

Trevor

Понравилась статья? Поделить с друзьями:
  • Copy color in word
  • Copy code to word
  • Copy cell to clipboard excel
  • Copy as html from word
  • Copy and pasting cells in excel