Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ramana
 
Posts: n/a
Default conditional formula in every third row and last row.

Hi everybody,

I wanted have a formula in every third row and in the last row
irrespective of whether its is the row that what I need. I think this
question is not so clear, so I'm giving one example here.

B1=26(can have any +ve integer value)
So now A1=If(B1=1,randbetween(10,20))
then I need A4=(B1=4,randbetween(10,20))
then I need A7=(B1=7,randbetween(10,20))
  #2   Report Post  
Ian
 
Posts: n/a
Default conditional formula in every third row and last row.

In A1 =IF(ROW()<=$B$1,RANDBETWEEN(10,20),"")
In A2 &A3 =IF(ROW()=$B$1,RANDBETWEEN(10,20),"")

Copy these 3 cells down as far as you need.

--
Ian
--
"ramana" wrote in message
oups.com...
Hi everybody,

I wanted have a formula in every third row and in the last row
irrespective of whether its is the row that what I need. I think this
question is not so clear, so I'm giving one example here.

B1=26(can have any +ve integer value)
So now A1=If(B1=1,randbetween(10,20))
then I need A4=(B1=4,randbetween(10,20))
then I need A7=(B1=7,randbetween(10,20))
.
.
.
.
then A25=(B1=25,randbetween(10,20))
here is now the problem

Now I need A26=(B1=26,randbetween(10,20)) as B1=26, and it
should be the last cell for the result.
I don't have the problem in creating in every third row but I need the
last result depending on the B1 cell value.

can any body help me to solve this problem.

Thanks and Regards

Ramana



  #3   Report Post  
ramana
 
Posts: n/a
Default conditional formula in every third row and last row.

Hi Ian,

Thanks alot, I thiught many ways to solve this, I missed the small
logic what you did. Now my problem is solve.

Thanks and Regards

Ramana

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"