SOLVED
Creating multiple variable
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
ARAJPUT_HENRY
6 - Meteoroid
‎10-17-2023
09:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Everyone,
Can anyone help me get to the solution of the data shown below-
I have around 250 variables that should be summed up to 90 variables. Example- A and B are variables that need to be built. A= A1+A2+A3, B= B1+B2+B3 . I know this can be easily done by formula tool but I have to make 90 variables like that. Any dynamic solution to sum up column A 1,2, 3,4 or 5 to variable named A , B1,2,3,4 or 5 to B and likewise to create 90 variables without writing code for each variable
Thank you !
A1 | A2 | A3 | A4 | B1 | B2 | B3 |
yes | yes | Tobacco | 10/17/2022 | |||
no | Diabetes | no | ||||
yes | 6years | Mild | yes | |||
yes | yes | 10/17/2022 | ||||
no | ||||||
no | Thyroid | no | ||||
no | no | |||||
no | 2 years | no | ||||
yes | Sepsis | yes | Alcohol | |||
yes | ||||||
yes | yes | |||||
yes | Heart problem | yes | ||||
yes | yes | |||||
Solved! Go to Solution.
Labels:
- Labels:
- Batch Macro
- Iterative Macro
- Macros
5 REPLIES 5
19 - Altair
‎10-17-2023
09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎10-17-2023
10:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @danilang
The output should look like this-
A | B |
yes | yes::Tobacco::10/17/2022 |
no::Diabetes | no |
yes::6years::Mild | yes |
yes | yes::10/17/2022 |
no | |
no::Thyroid | no |
no | no |
no::2 years | no |
Yes::sepsis | yes::Alcohol |
yes | |
yes | yes |
yes::Heart problem | yes |
Yes | yes |
17 - Castor
‎10-17-2023
06:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
flying008
15 - Aurora
‎10-17-2023
10:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎10-20-2023
11:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@caltang Thank you so much. It works perfectly.
