Excel - advanced formula help
Closed
mjohnson
-
Oct 21, 2010 at 02:49 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 28, 2010 at 09:12 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 28, 2010 at 09:12 AM
Related:
- Excel - advanced formula help
- Excel grade formula - Guide
- Number to words in excel formula - Guide
- Date formula in excel dd/mm/yyyy - Guide
- Logitech formula vibration feedback wheel driver - Download - Drivers
- Excel apk for pc - Download - Spreadsheets
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 28, 2010 at 09:12 AM
Oct 28, 2010 at 09:12 AM
Hi mjohnson,
A formula won't do the job. A formula can't change the value of another cell.
A VB code can.
So try this code:
Best regards,
Trowa
A formula won't do the job. A formula can't change the value of another cell.
A VB code can.
So try this code:
Sub test() Set MyRng = Range("B1:B100") For Each cell In MyRng If cell.Value = "s" Then cell.Offset(0, 1).Value = cell.Offset(0, 1).Value - 1 If cell.Value = "f" Then cell.Offset(0, 2).Value = cell.Offset(0, 2).Value - 1 Next End Sub
Best regards,
Trowa