Data to Certain Cells

uberathlete

Board Regular
Joined
Jul 11, 2007
Messages
117
Hi everyone, I really need some help. Here's the situation (please refer to the image):

52qajqp.jpg


Column A has dates , column B has 'data dates' and column D has data. The Ws in column B are just markers signifying that the data in column D must be in those cells that have a W.

Basically, the first data value in column D must must replace the first W in column B, the second data value in column D must replace the second W in column B and so on and so forth. I just want the data values to replace the Ws while the DATA column stays unchanged. So, in the end the result should look like this:

67xkkk3.jpg


Is there an easy way to get this done? I guess it would require code which unfortunately isn't my strong point. Any suggestions would be much appreciated. Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi uberathlete:

Let us see if the following formula based approach works for you ...
y070716h1.xls
ABCD
1DateData DatesDataDatesDATA
21-Jan-00 12
32-Jan-00 34
43-Jan-00 6
54-Jan-00W1298
65-Jan-00 22
76-Jan-00 
87-Jan-00W34
98-Jan-00W6
109-Jan-00 
1110-Jan-00 
1211-Jan-00 
1312-Jan-00W98
1413-Jan-00 
1514-Jan-00 
1615-Jan-00W22
Sheet12


I inserted column C and the formula in cell C2 is ...

=IF($B2="W",INDEX($D$2:$D$16,COUNTA($B$2:$B2)),"")

this formula is then copied down.

After that I can optionally hide column B.
 
Upvote 0

Forum statistics

Threads
1,222,173
Messages
6,164,388
Members
451,888
Latest member
OhSheet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top