ruzanovsky
New Member
- Joined
- Jul 12, 2018
- Messages
- 6
Hello,
The code below gives Type Mismatch 13 error:
Basically I want the code to press right until it hits the cell equal to Sheets("Cortes Proporcionais").Range("L4").Value
F1 is a blank cell,
G1:M1 are merged cells with the formula =UPPER(TEXT(TODAY();"MMMM"))
N1:T1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();1);"MMMM"))
U1:Z1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();2);"MMMM")) and
AA1:AF1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();3);"MMMM"))
Sheets("Cortes Proporcionais").Range("L4").Value is equal to the month to be used "March", "April", "May" or "June"
Why is the VBA giving type mismatch error? Both cells are string types. I assume it is due to the merged cells?
The code below gives Type Mismatch 13 error:
Code:
Range("F1").Select Do Until Selection.Value = Sheets("Cortes Proporcionais").Range("L4").Value
Selection.End(xlToRight).Select
Basically I want the code to press right until it hits the cell equal to Sheets("Cortes Proporcionais").Range("L4").Value
F1 is a blank cell,
G1:M1 are merged cells with the formula =UPPER(TEXT(TODAY();"MMMM"))
N1:T1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();1);"MMMM"))
U1:Z1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();2);"MMMM")) and
AA1:AF1 are merged cells with the formula =UPPER(TEXT(EDATE(TODAY();3);"MMMM"))
Sheets("Cortes Proporcionais").Range("L4").Value is equal to the month to be used "March", "April", "May" or "June"
Why is the VBA giving type mismatch error? Both cells are string types. I assume it is due to the merged cells?
Last edited: