I have to go through the complete A column and check if cell value length is < 6 then delete it.
I used to perform the operations on the sheet like this
activesheet.range("A" & row_number).select
selection.entirerow.delete
As people suggested using a variant I want to work with variants.
I have taken a set of range into a variant.
dim var as variant
var=sheet1.range("A1:D1000").value
Suppose I have 20 rows whose cell value length in A column is less than 6. I have to remove these 20 rows in the variant variable, including the other corresponding columns in variant that is B, C, D. I mean var(“A18:D18”) should be completely removed.
I heard people say we can’t delete an entry from a variant, we should take a new variant and copy only those values into the new variant. If that is the situation how do I copy one variant to another variant?
For rows whose A column cell value length is greater than 6, cell values should be converted into a standard format. I have done it using the sheet like
activesheet.cells("some cell!).value=activesheet.cells("").value
I loop through each row and it is taking some time as every time I’m knocking the sheet for values. I want to use variants now, take the complete range, perform the operation and write it back.
How to remove the complete row that we entered into variant like var(“A2:D2”), then copy the var(“A4:D4”) value to other variant like var2(“A6:D6”)?
Can we also insert an entry into variant at the middle of the variant like we insert row in the sheet?
Something like this
new row in array Y
Added formatting of sheet1 columns to sheet2 columns