Ironman
Well-known Member
- Joined
- Jan 31, 2004
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
The below code from the above extract should be pretty clear
I'm just needing a small bit of code to fill in the above (exaggerated) gap so:
1) when data (the date) is input in Col A then Col B is selected.
2) when data (the word 'OTHER') is input in Col B then Col F is selected.
Many thanks!
Cell Formulas | ||
---|---|---|
Range | Formula | |
G8674:G8675 | G8674 | =F8674/(220-(DATEDIF($G$7,A8674,"Y"))) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
LastLogDate | =OFFSET('Training Log'!$A$11,'Training Log'!$B$10,0) | G8674 |
LastRunDate | =OFFSET('Training Log'!$A$11,'Training Log'!$B$10,0) | G8674 |
Log_LastDate | =INDEX('Training Log'!All_Log_Dates,ROWS('Training Log'!All_Log_Dates)) | G8674 |
The below code from the above extract should be pretty clear
VBA Code:
Sub FillEndRowBlue()
Dim NextRow As Long
If ActiveSheet.Name = "Training Log" Then
NextRow = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & NextRow).Resize(, 7).Interior.Color = RGB(197, 217, 241)
Range("I" & NextRow).Resize(, 2).Interior.Color = RGB(197, 217, 241)
Range("I" & NextRow).Value = "Indoor bike session, 60 mins."
Range("A" & NextRow).Select
Range("F" & NextRow).Select
MsgBox "Enter heart rate", vbInformation, "Data input"
Else
MsgBox "Cell fill does not work in this sheet", vbInformation, "Information"
End If
End Sub
1) when data (the date) is input in Col A then Col B is selected.
2) when data (the word 'OTHER') is input in Col B then Col F is selected.
Many thanks!