Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default adding conditional rows

Hello, I want to be able to have rows/cells generated with a certain text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have you made?".
Now to this if the user answers "3" then I would want three cells below to
ask "what is the name of your first group", "what is the name of your second
group" and so on. Based on this further questions could be asked.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default adding conditional rows

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in message
...
Hello, I want to be able to have rows/cells generated with a certain text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have you

made?".
Now to this if the user answers "3" then I would want three cells below to
ask "what is the name of your first group", "what is the name of your

second
group" and so on. Based on this further questions could be asked.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default adding conditional rows

Hello Bob,
Can I do this without the VB? I dont know how to program macros or any form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in message
...
Hello, I want to be able to have rows/cells generated with a certain text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have you

made?".
Now to this if the user answers "3" then I would want three cells below to
ask "what is the name of your first group", "what is the name of your

second
group" and so on. Based on this further questions could be asked.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default adding conditional rows

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros or any

form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in message
...
Hello, I want to be able to have rows/cells generated with a certain

text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have you

made?".
Now to this if the user answers "3" then I would want three cells

below to
ask "what is the name of your first group", "what is the name of your

second
group" and so on. Based on this further questions could be asked.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default adding conditional rows

thank you bob, your help was indeed very useful. Now could you pls tell me,
what reading material should I refer to, to understand programming macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros or any

form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in message
...
Hello, I want to be able to have rows/cells generated with a certain

text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have you
made?".
Now to this if the user answers "3" then I would want three cells

below to
ask "what is the name of your first group", "what is the name of your
second
group" and so on. Based on this further questions could be asked.






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default adding conditional rows

Deepak,

Try starting here


'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


You might also look at David's tutorials page at:

http://www.mvps.org/dmcritchie/excel....htm#tutorials


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
thank you bob, your help was indeed very useful. Now could you pls tell

me,
what reading material should I refer to, to understand programming macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros or any

form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the

solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in

message
...
Hello, I want to be able to have rows/cells generated with a

certain
text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have

you
made?".
Now to this if the user answers "3" then I would want three cells

below to
ask "what is the name of your first group", "what is the name of

your
second
group" and so on. Based on this further questions could be asked.








  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default adding conditional rows

Thank you Bob. Thanks a million.


"Bob Phillips" wrote:

Deepak,

Try starting here


'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


You might also look at David's tutorials page at:

http://www.mvps.org/dmcritchie/excel....htm#tutorials


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
thank you bob, your help was indeed very useful. Now could you pls tell

me,
what reading material should I refer to, to understand programming macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros or any
form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the

solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in

message
...
Hello, I want to be able to have rows/cells generated with a

certain
text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have

you
made?".
Now to this if the user answers "3" then I would want three cells
below to
ask "what is the name of your first group", "what is the name of

your
second
group" and so on. Based on this further questions could be asked.









  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default adding conditional rows

Dear Bob,

In the solution provided by you, how do I assign a perticular cell to
capture/store the user inputs from the questions answered in the inputbox

Regards,
Deepak

"Deepak Varde" wrote:

Thank you Bob. Thanks a million.


"Bob Phillips" wrote:

Deepak,

Try starting here


'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


You might also look at David's tutorials page at:

http://www.mvps.org/dmcritchie/excel....htm#tutorials


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
thank you bob, your help was indeed very useful. Now could you pls tell

me,
what reading material should I refer to, to understand programming macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros or any
form
of VB. I was looking more towards understanding the concept and then
applying. If there is no way then I would try and understand the

solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" <Deepak wrote in

message
...
Hello, I want to be able to have rows/cells generated with a

certain
text
based on the answer given by a user.
For example, My question in a cell could be "how many groups have

you
made?".
Now to this if the user answers "3" then I would want three cells
below to
ask "what is the name of your first group", "what is the name of

your
second
group" and so on. Based on this further questions could be asked.









  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default adding conditional rows

If I properly understand you, Bob provided that in his first post
another idea

range("a1").value=inputbox("your question")

--
Don Guillett
SalesAid Software

"Deepak Varde" wrote in message
...
Dear Bob,

In the solution provided by you, how do I assign a perticular cell to
capture/store the user inputs from the questions answered in the inputbox

Regards,
Deepak

"Deepak Varde" wrote:

Thank you Bob. Thanks a million.


"Bob Phillips" wrote:

Deepak,

Try starting here


'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


You might also look at David's tutorials page at:

http://www.mvps.org/dmcritchie/excel....htm#tutorials


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
thank you bob, your help was indeed very useful. Now could you pls
tell
me,
what reading material should I refer to, to understand programming
macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you
seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in
message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros
or any
form
of VB. I was looking more towards understanding the concept and
then
applying. If there is no way then I would try and understand the
solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" & i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing
direct)

"Deepak Varde" <Deepak wrote
in
message
...
Hello, I want to be able to have rows/cells generated with a
certain
text
based on the answer given by a user.
For example, My question in a cell could be "how many groups
have
you
made?".
Now to this if the user answers "3" then I would want three
cells
below to
ask "what is the name of your first group", "what is the name
of
your
second
group" and so on. Based on this further questions could be
asked.













  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default adding conditional rows

Deepak,

Do you understand how to use variables? I ask as I showed you that first
post up, but I think you may not have understood.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in message
...
Dear Bob,

In the solution provided by you, how do I assign a perticular cell to
capture/store the user inputs from the questions answered in the inputbox

Regards,
Deepak

"Deepak Varde" wrote:

Thank you Bob. Thanks a million.


"Bob Phillips" wrote:

Deepak,

Try starting here


'Getting Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


You might also look at David's tutorials page at:

http://www.mvps.org/dmcritchie/excel....htm#tutorials


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in

message
...
thank you bob, your help was indeed very useful. Now could you pls

tell
me,
what reading material should I refer to, to understand programming

macros?


"Bob Phillips" wrote:

Not really. You might be able to get some way with conditional
formulae/formatting, but not for the sort of flexibility that you

seek.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Deepak Varde" wrote in

message
...
Hello Bob,
Can I do this without the VB? I dont know how to program macros

or any
form
of VB. I was looking more towards understanding the concept and

then
applying. If there is no way then I would try and understand the
solution
that you've provided.


"Bob Phillips" wrote:

As a astarter

Sub Macro1()
Dim ans
Dim i As Long
Dim sName As String

ans = InputBox("How many groups have you made")
If ans < "" Then
ActiveCell.Offset(1, 0).Resize(3).Insert
For i = 1 To ans
sName = InputBox("What is the name of group #" &

i)
ActiveCell.Offset(i, 0).Value = sName
Next i
End If

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing

direct)

"Deepak Varde" <Deepak wrote

in
message
...
Hello, I want to be able to have rows/cells generated with a
certain
text
based on the answer given by a user.
For example, My question in a cell could be "how many groups

have
you
made?".
Now to this if the user answers "3" then I would want three

cells
below to
ask "what is the name of your first group", "what is the

name of
your
second
group" and so on. Based on this further questions could be

asked.











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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use conditional formatting to hide or delete rows? linda.beautiful.california Excel Worksheet Functions 6 July 15th 08 09:09 PM
Adding and Deleting rows - update formulas help needed. bperks Excel Worksheet Functions 1 May 31st 06 08:30 PM
Adding and deleting rows with formulas ****Need Help**** [email protected] Excel Discussion (Misc queries) 5 May 31st 06 05:42 PM
Adding summaries, rows and pre-population JFH New Users to Excel 1 May 24th 05 08:52 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM


All times are GMT +1. The time now is 04:00 PM.

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

About Us

"It's about Microsoft Excel"