Sửa lỗi that command cannot be used on multiple selections năm 2024

This tutorial demonstrates how to fix the “This action won’t work on multiple selections.” error in Excel.

You are usually able to copy multiple selections in Excel from one range to another by holding down CTRL on the keyboard to select non-adjacent rows or columns, and then clicking Copy with the ranges selected. However, you may occasionally encounter an error.

Multiple Columns With Different Rows

If each range consists of a different number of rows, you can’t copy multiple selections. Make sure each column contains an identical number of rows, and then try to copy the data.

If you adjust your copy selection as described below, you may still experience the error.

In the above graphic, although the rows selected in each of the columns is the same, the data has not been selected correctly. You can see this by the two areas depicted by the red rectangles [the white background on cell B8 and the slight line above cell D11]. These selections would have been made by selecting B3:B7 and then B8:B13, and in Column D, D3:D10 and then D11:D13 and finally F3:F13. The copy command fails.

To fix this error, reselect the three areas of data by selecting the first area [B3:B13], and then holding down the CTRL key, select the same row area in Columns D and F.

Multiple Rows With Different Columns

The same error occurs if you select multiple rows, but with different columns.

Once again, make sure that the rows and columns in the multiple selections match before you select Copy.

I know this error generally means that you're trying to do something with multiple cells that is restricted to a single cell.

But what I'm trying to do is copy one cell from one workbook [source file] and paste it into another [destination]. This happens even when I do it *manually* so it's not a VB issue.

And what's even stranger is that when I select two worksheets on the source file and try to paste the contents into a single worksheet destination file [and *should* get this error, I *don't* !

Any ideas?

VLOOKUP to Left?

Use =VLOOKUP[A2,CHOOSE[{1,2},$Z$1:$Z$99,$Y$1:$Y$99],2,False] to lookup Y values to left of Z values.

shg

MrExcel MVP
  • 2

Can you explain a simple way to replicate the problem? Or post code that illustrates?

  • 3

Since it happens even when I'm NOT using VB, I don't think posting code would help...

The problem occurs in a simple Copy-Paste routine. I'm using Control C to copy, going to a new blank worksheet, and Control V to paste.

It's clearly *something* in the source worksheet, since I do know how to copy & paste. But I don't know what it is, which means I can't fix it...

  • 4

It sounds like you may be selecting a discontinuous* range. Copy and Paste [and other features] work only on simple rectangular ranges.

*-Although commonly used, the word "discontinuous" is a misnomer. For example the range A1:D6,C4:E9 is commonly called a "discontinuous range" even though it is continuous in that one can go from cell to cell throughout the range. An accurate synonym for the common term "discontinuous range" would be "convex range".

shg

MrExcel MVP
  • 5

    I'm using Control C to copy, going to a new blank worksheet, and Control V to paste

The error should occur on the copy, before you ever get to the paste. Does it not?

EDIT: Not relevant to your problem if it is indeed a single cell selected, but you can copy and paste a non-contiguous range as long as all the cells are in the same row or same column.

Last edited: Dec 17, 2010

  • 6

quadrilateral

How does convex work there? Maybe it's a technical thing, but I think quadrilateral is the right word...

I get lots of hits for convex range on google, but no definitions. Where can I find that?

Last edited: Dec 17, 2010

  • 7

Wut, I don't want to hijack the thread with a discussion of terminology, but there are non-convex quadrilaterals. "Rectangular" would be an alternative to "convex" as would the Excel term Area.

Excel's term Area would be the preferred term [single Area range vs. multi-Area range] except that its not understandable by non-Excel savvy folks. "Convex" is similarly obscure. "Rectangular" would be a good common term. But internet practice at the moment seems to be "discontinuous".

shg

MrExcel MVP
  • 8

A non-contiguous range is one that is not [or cannot be] described simply by its corners.

For example, if you select A1:C2, and then add A2:C3 to the selection, the result is a contiguous range [A1:C3], but the description [A1:C2, A2:C3] is not, and Excel won't let you copy it.

  • 9

I appreciate the high-level commentary -- but Guys - This is a SINGLE CELL copy that's blowing. And no, it's on the Paste portion...

Chủ Đề