How do I get a value in a cell based on another cell
Closed
mahbarker
Posts
1
Registration date
Tuesday February 16, 2016
Status
Member
Last seen
February 16, 2016
-
Feb 16, 2016 at 05:37 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 18, 2016 at 11:23 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 18, 2016 at 11:23 AM
Related:
- How do I get a value in a cell based on another cell
- Based on the value in cells b77 b81 ✓ - Excel Forum
- Conditional formatting if cell contains text - Excel Forum
- Count if cell contains number - Excel Forum
- If cell contains date then return value ✓ - Excel Forum
- Excel "IF" function w/ date in test cell ✓ - Excel Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Feb 18, 2016 at 11:23 AM
Feb 18, 2016 at 11:23 AM
Hi Mahbarker,
When a number is found in both columns (B & C) then the result will be "Photo".
Here is the code:
Best regards,
Trowa
When a number is found in both columns (B & C) then the result will be "Photo".
Here is the code:
Sub RunMe() For Each cell In Range("B1:B" & Range("B" & Rows.Count).End(xlUp).Row) If IsNumeric(cell.Value) = True And cell.Value <> vbNullString Then cell.Offset(0, -1).Value = "Standard" Next cell For Each cell In Range("C1:C" & Range("C" & Rows.Count).End(xlUp).Row) If IsNumeric(cell.Value) = True And cell.Value <> vbNullString Then cell.Offset(0, -2).Value = "Photo" Next cell End Sub
Best regards,
Trowa