Forum Discussion
is there a fast way to match my "cell content" to the "row number"
Hello guys,
please help me π
is there a fast way to match my "cell content" to the "row number"? TT_TT
Ex: the ones with the yellow Highlight
my "cell content" 326 matches with the "row number" 326
my cell content 337, matches with the row number 337
I want to do the same thing with cell contents 350, 353, 361, 365, 372, 380, 385, 389, 397, 402, 409 and 411
PLEASE HELP ME π
In the attached file you can click the button in cell H2 to start the macro. Maybe this is what you are looking for.
Sub rownumber() Dim i As Integer Dim z As Integer For i = 1 To 1000 If Cells(i, 1).Value > 0 Then z = Cells(i, 1).Value Cells(z, 5).Value = Cells(i, 1).Value Cells(z, 6).Value = Cells(i, 2).Value Else End If Next i End Sub
9 Replies
- OliverScheurichGold Contributor
In the attached file you can click the button in cell H2 to start the macro. Maybe this is what you are looking for.
Sub rownumber() Dim i As Integer Dim z As Integer For i = 1 To 1000 If Cells(i, 1).Value > 0 Then z = Cells(i, 1).Value Cells(z, 5).Value = Cells(i, 1).Value Cells(z, 6).Value = Cells(i, 2).Value Else End If Next i End Sub- sophiekatchuCopper ContributorWOAHHH THIS IS THE ANSWER I'M LOOKING FOR T,T THANK YOU SO MUCH~~
But the problem is... I don't know how I'm going to tweak the formula π can you please teach me how? π here's a sample data set:- sophiekatchuCopper Contributor
- pfridolfCopper Contributor
If you can accept an extra column (that could be hidden) this might be a simple solution.
The information in column E will be reflected to column B in the row number put in column D.
Of course the IF(ISTEXT ...;"") could be skipped. (unfortunately I can't attach files)
- Riny_van_EekelenPlatinum Contributor
sophiekatchu Perhaps you just type =ROW() in a cell in column A and copy it down.
- sophiekatchuCopper Contributorit doesn't work, but thank you so much Riny π
what I want is to sort it easily where the cell number matches with the corresponding row number
so if my cell contains the number 15, I want it to be in row number 15
What I do is I do it "manually", I highlight then insert cells down until it reaches the corresponding row number ~it's tiresome and it's eating up my time too much π- Riny_van_EekelenPlatinum Contributor
sophiekatchu As a variant, I came up (after some thought) with a PowerQuery solution. Assuming that your columns will have headers and that there may be an unknown number of columns in the Table.
File attached.
Edit: Made a small change to the query.