Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Formula / Conditional

0

Hello, 

Cell  Range A2 is dynamic cell where number changes between -300 to +300

Row range B1:BJ1 which contain fixed data from -300 to +300

Each cell in Row Range B2:BJ2 need to calculate difference between Cell A2 and upper cell range B1:BJ1 and show the difference between upper fixed cells and  dynamic cell A2.

Need to repeat same row range A2:A8.

.please see attached file. 

 Appreciate your help. 

.

Answer
Discuss

Answers

0
Selected Answer

Hello GRock,

In cell B2 emter the formula:   =IF(B1-$A2<0,(B1-$A2)*-1,B1-$A2)

Then copy this down to B8. Then select cells B2:B8 and copy over to BJ2:BJ8

Cheers   ;-}

Discuss

Discussion

Thanks alot.. 
GRock (rep: 2) Aug 22, '20 at 11:04 pm
Looks the same as =ABS(B1-$A2)
pecoflyer Aug 25, '20 at 12:44 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login