![]() |
Formula Set Up Needed
Hello,
I am trying to show bond yield charts, everytime the interest rate changes. I have a series of data. And in cell A1 I have the interest rate. I want each of the cells in the series of data, to equal the sum of A1 + 0.5, if cell A1 is greater then 5.00. Otherwise I want each cell in the series of data to equal the sum of A1 - 0.5, if cell A1 is <5.00. Also I want the A1 + 0.5 bit to occur for only half of cells in the data series, and the other half with the A1 - 0.5 bit. Any ideas how I can proceed. Regards |
Formula Set Up Needed
There are a lot of ways to do this, depending on the logic flow of your
procedure and the organization of your worksheet. Let's say that your data series runs from cell B1 down to B10. Then you might run a loop like this: Sub IntRate() Range("B1").Select For x = 1 To 10 If Range("A1").Value = 0.5 Then ActiveCell.Offset(x, 0).Value = Range("A1").Value + 0.5 Else ActiveCell.Offset(x, 0).Value = Range("A1").Value - 0.5 End If Next End Sub Obviously, this loop will have to be modified to accomodate the location and organization of your data series. Also, are you sure that you want every value in your data series to have the exact same rate? I think that is what you are describing here. Good luck, Randy |
Formula Set Up Needed
Try this:
=if(a15,a1+.5,if(a1<5,a1-.5,"") With regard to the hlaf the cells thing with each +/-.5...no idea how to get those automatically, but you can use the formuals individually...maybe try: =if(a15,a1+.5,"") =if(a1<5,a1-.5,"") Let me know how that works out for you. "unique" wrote: Hello, I am trying to show bond yield charts, everytime the interest rate changes. I have a series of data. And in cell A1 I have the interest rate. I want each of the cells in the series of data, to equal the sum of A1 + 0.5, if cell A1 is greater then 5.00. Otherwise I want each cell in the series of data to equal the sum of A1 - 0.5, if cell A1 is <5.00. Also I want the A1 + 0.5 bit to occur for only half of cells in the data series, and the other half with the A1 - 0.5 bit. Any ideas how I can proceed. Regards |
Formula Set Up Needed
Helllo, I keep getting the 'object required' error when I use that code. Any
modifications, which can be made. regards |
All times are GMT +1. The time now is 05:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com