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
Hi,
How can I get excel to fill in some information for me?
I want the value in column A to be filled in based on the value in either column B or C. For example, I have a number in either column B or C and I want everything with a number in column B to show "Standard" in column A and everything that shows a number in column C to show "Photo" in column A.
Can someone please help me?
How can I get excel to fill in some information for me?
I want the value in column A to be filled in based on the value in either column B or C. For example, I have a number in either column B or C and I want everything with a number in column B to show "Standard" in column A and everything that shows a number in column C to show "Photo" in column A.
Can someone please help me?
Related:
- How do I get a value in a cell based on another cell
- Insert a function in cell b2 to display the current date from your system. ✓ - Excel Forum
- How to insert rows in excel automatically based on cell value without vba ✓ - Excel Forum
- If cell contains date then return value ✓ - Excel Forum
- Excel: If Date =, then enter a value ✓ - Excel Forum
- Excel formula to check if cell contains a date - 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