Excel - If clause - Changing value of another cell

%3CLINGO-SUB%20id%3D%22lingo-sub-1513913%22%20slang%3D%22en-US%22%3EExcel%20-%20If%20clause%20-%20Changing%20value%20of%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1513913%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20would%20like%20to%20do%20the%20following%20in%20Excel%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20cell%20B1%2C%20I%20would%20like%20to%20check%20whether%20the%20number%20in%20A1%20is%20smaller%20than%20C1.%3C%2FP%3E%3CP%3EIf%20that%20is%20the%20case%2C%20I%20would%20like%20to%20put%20a%20certain%20number%20in%20B1%2C%20and%20simultaneously%20change%20the%20value%20in%20C1%20(C1%2B1)%3C%2FP%3E%3CP%3EHow%20can%20I%20make%20a%20formula%20in%20B1%2C%20so%20it%20changes%20the%20value%20of%20another%20cell%20(in%20this%20case%20C1%20by%20C1%2B1)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20be%20great%20if%20someone%20has%20an%20idea!%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3Ecado%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1513913%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514169%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20-%20If%20clause%20-%20Changing%20value%20of%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514169%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724621%22%20target%3D%22_blank%22%3E%40cado11125%3C%2FA%3E%26nbsp%3BYou%20will%20need%20a%20macro%20for%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESub%20Nestedif()%3C%2FP%3E%3CP%3ESheet1.Activate%3C%2FP%3E%3CP%3EIf%20Cells(1%2C%203)%20%26gt%3B%3D%20Cells(1%2C%201)%20Then%3CBR%20%2F%3ECells(1%2C%202).Value%20%3D%2055%3CBR%20%2F%3ECells(1%2C%203).Value%20%3D%20Cells(1%2C%203).Value%20%2B%201%3CBR%20%2F%3EEnd%20If%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20liked%20my%20answer%20please%20do%20mark%20my%20answer%20as%20Official%20Answer%20and%20Also%20subscribe%20my%20Youtube%20channel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-ERR%3AREF-NOT-FOUND-%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4SlI8HOGvlM%26amp%3Bt%3D3s%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4SlI8HOGvlM%26amp%3Bt%3D3s%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hello,

I would like to do the following in Excel:

 

In cell B1, I would like to check whether the number in A1 is smaller than C1.

If that is the case, I would like to put a certain number in B1, and simultaneously change the value in C1 (C1+1)

How can I make a formula in B1, so it changes the value of another cell (in this case C1 by C1+1)

 

Would be great if someone has an idea!

Best,

cado

1 Reply
Highlighted

@cado11125 You will need a macro for this

 

Sub Nestedif()

Sheet1.Activate

If Cells(1, 3) >= Cells(1, 1) Then
Cells(1, 2).Value = 55
Cells(1, 3).Value = Cells(1, 3).Value + 1
End If

End Sub

 

If you liked my answer please do mark my answer as Official Answer and Also subscribe my Youtube channel

 

https://www.youtube.com/watch?v=4SlI8HOGvlM&t=3s

Hi Guys, I have come up with the second part of Invoice Automation through Excel video. This Utility will help you to generate Invoice as shown in previous v...