I have the following code
the first 8 lines are always needed. Is there a simple way to have Excel check whether Cell 5,54 has a value first and if so run the following 6 lines of code and if not skip to check whether Cell 5,55 has a value and again if so run the following 6 lines of code and if not skip down.
the first 8 lines are always needed. Is there a simple way to have Excel check whether Cell 5,54 has a value first and if so run the following 6 lines of code and if not skip to check whether Cell 5,55 has a value and again if so run the following 6 lines of code and if not skip down.
VBA Code:
Sheets("File").Cells(Exportrow, 1) = " <LOCUS>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " <LOCUSNAME>" & Sheets("Entry").Cells(5, 53) & "</LOCUSNAME>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " <READINGBY>" & user & "</READINGBY>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " <READINGDATETIME>" & yr & "-" & mn & "-" & dd & "T" & hr & ":" & mi & ":" & sc & "</READINGDATETIME>"
[COLOR=rgb(65, 168, 95)]'i would like the macro to check cell 5,54 on sheet Entry first, proceed is not blank, skip if is blank[/COLOR]
Sheets("File").Cells(Exportrow, 1) = " <ALLELE>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " <ALLELEVALUE>" & Sheets("Entry").Cells(5, 54) & "</ALLELEVALUE>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " </ALLELE>"
Exportrow = Exportrow + 1
[COLOR=rgb(65, 168, 95)]'i would like the macro to check cell 5,55 on sheet Entry first, proceed is not blank, skip if is blank [/COLOR]
Sheets("File").Cells(Exportrow, 1) = " <ALLELE>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " <ALLELEVALUE>" & Sheets("Entry").Cells(5, 55) & "</ALLELEVALUE>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " </ALLELE>"
Exportrow = Exportrow + 1
Sheets("File").Cells(Exportrow, 1) = " </LOCUS>"
Exportrow = Exportrow + 1