FindingMyself
New Member
- Joined
- Jun 27, 2011
- Messages
- 19
So the basic idea of my code is:
If Sheets("Settings").Range("A2").Value = "" Then
Sheets("PMChecklist").Range("G1").Value = Sheets("Settings").Range("A23").Value
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A24").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A25").Value
Else
Sheets("PMChecklist").Range("G1").Value = Sheets("Settings").Range("A2").Value
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A3").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A4").Value
End If
If Sheets("Settings").Range("A3").Value = "" Then
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A23").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A24").Value
Sheets("PMChecklist").Range("J1").Value = Sheets("Settings").Range("A25").Value
Else
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A3").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A4").Value
Sheets("PMChecklist").Range("J1").Value = Sheets("Settings").Range("A5").Value
End If
However, if I do it this way it'll be extremely long and tedious. Is there a way for me to fill the next column with the value of a cell that is not empty? Sorry if this is all confusing...
Edit: I just realized my code logic is totally flawed, basicly what I need to do is fill cell G1 on worksheet1 with the value of cell A2 on worksheet 2. However, if cell A2 is empty, then G1 is filled with the value of cell A23 instead.
If Sheets("Settings").Range("A2").Value = "" Then
Sheets("PMChecklist").Range("G1").Value = Sheets("Settings").Range("A23").Value
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A24").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A25").Value
Else
Sheets("PMChecklist").Range("G1").Value = Sheets("Settings").Range("A2").Value
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A3").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A4").Value
End If
If Sheets("Settings").Range("A3").Value = "" Then
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A23").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A24").Value
Sheets("PMChecklist").Range("J1").Value = Sheets("Settings").Range("A25").Value
Else
Sheets("PMChecklist").Range("H1").Value = Sheets("Settings").Range("A3").Value
Sheets("PMChecklist").Range("I1").Value = Sheets("Settings").Range("A4").Value
Sheets("PMChecklist").Range("J1").Value = Sheets("Settings").Range("A5").Value
End If
However, if I do it this way it'll be extremely long and tedious. Is there a way for me to fill the next column with the value of a cell that is not empty? Sorry if this is all confusing...
Edit: I just realized my code logic is totally flawed, basicly what I need to do is fill cell G1 on worksheet1 with the value of cell A2 on worksheet 2. However, if cell A2 is empty, then G1 is filled with the value of cell A23 instead.
Last edited: