Avatar of ADRIANA P
ADRIANA P
Flag for United States of America asked on

populate some cells after data verification

I have data in cel B7  IF IS TRUE I NEED POPULATE THE ADJACENTS  CELL  WITH A LIST OF VALUE

LIKE THE EXAMPLE HERE

HOW CAN I DO THAT ?

THNKS IN ADVANCED
Book2.xlsx
Microsoft OfficeSpreadsheetsMicrosoft ExcelVBA

Avatar of undefined
Last Comment
Shums Faruk

8/22/2022 - Mon
Shums Faruk

What is the logic behind these numbers? "01,29,79,09,99,19,69,44,49,41,46,66"
Shums Faruk

With what you are comparing B7 to be true?
ADRIANA P

ASKER
LIKE I SAY GOOD FRIEND
 IF B7 = 01  I NEED THEM POPULATE THE C7, D7, E7, F7, ECT..
WITH THE NUMBERS
"01,29,79,09,99,19,69,44,49,41,46,66"
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ADRIANA P

ASKER
IF TRUE I NEED PUT 01 IN C7, 29 IN D7, 79 IN E7 ECT...
ADRIANA P

ASKER
IF THAT POSIBLE ?
Shums Faruk

Copy paste your string "01,29,79,09,99,19,69,44,49,41,46,66" in O7, then in C7 paste below formula:
=IF($B7="01",SUBSTITUTE(MID(SUBSTITUTE("," & $O7&REPT(" ",6),",",REPT(",",255)),1*255,255),",",""))

Open in new window

Change the number 1*255 to 2*255 for D7, 3*255 for E7 and so on.

Please find attached for your reference.

Hope this helps
Book2_v1.xlsx
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
NOT REALLY!
WHAT I NEED IS
WHEN 01 APPEAR IN THE LIST OF NUMBERS
POPULATE AUTOMATIC THE ADJACENTES  CELLS WITH THE VALUES
"01,29,79,09,99,19,69,44,49,41,46,66" BUT EACH VALUE SHOUD GO IN AN CELL
01 IN C7 , 29 IN D7 ECTT

BUT IF 01 APPEAR IN OTHER POTISION SAY C20
THAT SHOULD BE THE SAME  01 IN D20, 29 IN E20 ECT..
ADRIANA P

ASKER
MY CORRECTION IF 01 APPEAR IN B20
Shums Faruk

Wherever you have 01 in B Column, you need to have those numbers in O column as well.

Please find attached.
Book2_v2.xlsx
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ADRIANA P

ASKER
YES !
ADRIANA P

ASKER
BUT THE EXAMPLE YOU SEND ME IS NOT WHAT I NEED BECAUSE
DUPLICATE THE DATA
Shums Faruk

Then please send me with every examples what you need?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
WELL I SEND ALREADY
IF A HAVE AN LIST OF NUMBERS AND 01 APPEAR I NEED THE  NUMEBRS
"01,29,79,09,99,19,69,44,49,41,46,66" BE POSTED IN THE NEXT CELLS BUT
EACH NUMBER AN BY CELL  IN THE ADJACENTS CELLS TO WHERE 01 APPEAR
ADRIANA P

ASKER
EACH NUMBERS IN AN CELL  EXAMPLE
01 IS IN B20 , 01 IN C20, 29 IN D20, 79 IN E29 ECT..
Shums Faruk

This is the same result you are getting splitting the numbers in each adjacent cell, where 01 appears in B Column.
Split Cells
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ADRIANA P

ASKER
NO IS NOT
ADRIANA P

ASKER
IS ANY WAY
WHEN 01 APPEAR TO POPULATE THE CELLS
BUT NOT DUPLICATE THE SAME  DATA ???
Shums Faruk

Check again,

If B20 has 01, then all adjacent columns has split strings in same rows. See below columns & row number. Which does what you asked for:
Split Cells
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
I MEAN
THAT WHY I WRITE THE IF STATEMENTE BUT
I DON'T KNOW HOW MAKE POPULATE  THE CELLS

=IF(b7=1, "01,29,79,09,99,19,69,44,49,41,46,66"," ")
WITH THIS DATA
ADRIANA P

ASKER
IF TRUE  what i want is ti populate the cells with this data but each number in separete cell
ADRIANA P

ASKER
sorry for my caps ons
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Shums Faruk

It wont duplicate the data, if you have another set of numbers for 01, then paste those numbers in Column O. It wont be duplicate.
Check below image:
Split Cells
ADRIANA P

ASKER
thats is what i dont want to do paste
i need be automatic
ADRIANA P

ASKER
every time 01 appear automatic popukate the cells
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
populate
Shums Faruk

OK please find attached...
Book2_v3.xlsx
ADRIANA P

ASKER
is not good
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Shums Faruk

Apology, I cannot help further.
ADRIANA P

ASKER
if simple but i don't know hpw to do

if a have an lists of numbers
and 01 appear i need automatic populate the adajacents cells
with  "01,29,79,09,99,19,69,44,49,41,46,66" have to be in separeta cell each number

i can not have those numebres in the first row
ADRIANA P

ASKER
don't know if have to be doing with visaul basic
but i don't know how to do
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Shums Faruk

Please find attached last try with formula:
Book2_v4.xlsx
ADRIANA P

ASKER
not working sorry

is any way that i can write an statement
with visual basic ??
for that situation??
Shums Faruk

I am busy with. Just hold on
Your help has saved me hundreds of hours of internet surfing.
fblack61
Shums Faruk

Please find attached....Click on update columns
Book2_v5.xlsm
ADRIANA P

ASKER
sure take your time

my list number

02
58
53
87
96
01 then i need populate with the "01,29,79,09,99,19,69,44,49,41,46,66" the cell in the same row
but i can have other number
lets say
28  then 28 have some data 20,33,47,89,57,55,


that reason i can do like you say
but for now i need 01
ADRIANA P

ASKER
i can't do like you say because other data will be there
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Shums Faruk

Good luck
ADRIANA P

ASKER
is interesting but how i can edit if  i need??
ADRIANA P

ASKER
you answer don't work for my
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Shums Faruk

It will work. Just give me all the relative numbers for all lookup numbers. You provided just one example of 01, for which macro and formula both works.
I would want you to provide me expected result typed manually in your sheet.
ASKER CERTIFIED SOLUTION
Shums Faruk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
GREAT JOB ! SHUMS  !!
JUST ONE QUESTION !
CAN I SEE THE CODE BEHIND ??
Shums Faruk

Navigate to Developer/VisualBasic and you can see the code
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ADRIANA P

ASKER
GREAT JOB !
Shums Faruk

You're welcome Adriana! Glad it eventually worked for you. :)