Assign value from one cell to other-Excel VB
Closed
LvD
-
27 Oct 2011 à 07:27
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 1 Nov 2011 à 10:01
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 1 Nov 2011 à 10:01
Related:
- Assign value from one cell to other-Excel VB
- How to copy data from one excel sheet to another - Guide
- Excel mod apk for pc - Download - Spreadsheets
- How to copy data to multiple worksheets in Excel - Guide
- Excel multiple lines in one cell - Guide
- How to transfer data from one Excel sheet to another? - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
1 Nov 2011 à 10:01
1 Nov 2011 à 10:01
Hi LvD,
You can do this using formula's.
A1: VLOOKUP formula
A2:A5: each cell contains same formula: =IF($A$1<>"",$A$1,"")
A6: VLOOKUP formula
A7:A10: =IF($A$6<>"",$A$6,"")
etc...
Depending on how much data you have it might be easier to use macro:
Best regards,
Trowa
You can do this using formula's.
A1: VLOOKUP formula
A2:A5: each cell contains same formula: =IF($A$1<>"",$A$1,"")
A6: VLOOKUP formula
A7:A10: =IF($A$6<>"",$A$6,"")
etc...
Depending on how much data you have it might be easier to use macro:
Sub test()
Dim x As Integer
Dim lRow As Integer
lRow = Range("A" & Rows.Count).End(xlUp).Row
x = 1
Do
If Cells(x, 1) <> "" Then Cells(x + 1, 1) = Cells(x, 1)
Cells(x + 2, 1) = Cells(x, 1)
Cells(x + 3, 1) = Cells(x, 1)
Cells(x + 4, 1) = Cells(x, 1)
x = x + 5
Loop Until x > lRow
End SubThis code is based on the assumption that the VLOOKUP's are already in place.
Best regards,
Trowa