Assign value from one cell to other-Excel VB
Closed
LvD
-
Oct 27, 2011 at 07:27 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 1, 2011 at 10:01 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 1, 2011 at 10:01 AM
Related:
- Assign value from one cell to other-Excel VB
- Transfer data from one excel worksheet to another automatically - Guide
- Number to words in excel - Guide
- Excel send value to another cell - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel marksheet - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Nov 1, 2011 at 10:01 AM
Nov 1, 2011 at 10:01 AM
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