I will to try to explain this as best as I can.
I have 2 sheets:
- Sheet 1
- Sheet 2
Sheet 1 has a lot of rows with information, name, address.. ads etc.
The important one is “Ads”. You can Select, Yes, No or Maybe via dropdown.
If the user selects YES on sheet 1, on the “Ads” column the the information in the SELECTED columns will be referenced to sheet 2 assuming you have “Yes” in the “ads” column.
I can use the IF statement, if ROW 2,3,4, state yes and row 5,6 states NO and row 7 states yes.
Then on sheet 2, there will be 2 rows that are not populated, so I would like to get rid of the 2 rows to make things look nicer.
I would also like to states that on Sheet 2, there will be extra information for the ads, such as time, date, locate etc etc.
I am not sure if there has to be a macro.
I hope this is clear , please as anything which you make need to know
Thank you
Updated:
In sheet 2 Column b,c,d etc… I will put NEW information about connected to column A in sheet two. How if I change a old Yes to No in sheet 1 regarding ads. the rows adjust in Sheet 2, but one column A, no b nor c etc. So you looses the preservation of the data. Any solution around that. – Arthor 2 days ago
One way with no array formulas, just uses a “helper column” off to the right on sheet1, the same sheet you’re selecting ADS = yes/no on.
Let’s assume column Z is empty.
Let’s assume the “ADS” column is column M.
In Z2, put this formula: =IF(M2=”Yes”, N(Z1)+1, N(Z1))
Copy that cell down column Z to the bottom of the data set. The result is an “index” where you can spot the “YES” rows based on when the index number increase by one. Now let’s use the index.
On Sheet2, put this formula in A2: =IF(ROW(A1)>MAX(Sheet1!$Z:$Z), “”, INDEX(Sheet1!A:A, MATCH(ROW(A1), Sheet1!$Z:$Z, 0))
The first column A value from sheet1 where “yes” is in the ADS column. Now copy that cell to the right to get the rest of the values from that row to appear.
Now copy that set of cells down and across the sheet2 table to get your values to appear. You can copy down a ways and the values will go blank when it runs out of “yes” rows.
This will not only display all the yes rows, it will display them in the same order they are on sheet1.