last 5 yellow highlights transpose

makinmomb

Active Member
Joined
Dec 23, 2013
Messages
401
I have these kind of data on a1

250,000
48,000
50,000
35,000
40,000
60,000
35,000
230,000
35,000
16,000
15,000
814,000
45,000
50,000
90,000
-
200,000
140,000
210,000
65,000
800,000
144,000
40,000
5,000
-
65,000
25,000
10,000
289,000
50,000
43,000
41,000
73,000
-
200,000
10,000
10,000
427,000
43,700
106,200
5,500
2,000
2,000
0
556,000
715,400
45,400
444,000
27,000
41,000
73,000
-
240,000
5,000
10,000
15,000
70,000
48,000
1,018,400

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
1,018,400 , 715,400 , 427,000 , 289,000 and 800,000

Are in yellow highlights

I need a macro that should put to do the following

put on c1 1018400
put on d1 715400
put on e1 42700
put on f1 289000
put on g1 800000
 
Upvote 0
Try:
Code:
Sub TranposeRange()
    Application.ScreenUpdating = False
    Dim LastRow As Long
    LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Range("A1:A" & LastRow).AutoFilter Field:=1, Criteria1:=RGB(255, 255, 0), Operator:=xlFilterCellColor
    Range("A2:A" & LastRow).SpecialCells(xlCellTypeVisible).Copy
    Range("C1").PasteSpecial Transpose:=True
    Range("A1").AutoFilter
    Application.ScreenUpdating = True
End Sub

The macro assumes you have headers in row 1 and your data starts in row 2.
 
Upvote 0

Forum statistics

Threads
1,216,189
Messages
6,129,408
Members
449,509
Latest member
ajbooisen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top