if statements in vba

November 16, 2010 at 03:48:59
Specs: Windows XP
I am creating a report for a 12 month review. I have one sheet that is my "Front" sheet and have
another 12 sheets (one for each month). Within these sheets i have data for about 45 different different people with their own ranges.

On my front page I have drop down boxes one for the name of the person and another one for the month. I would like to get it so that when a specific name and a specific month is selected the appropriate data will show in the "Front" Sheet in one data range that mirrors the other sheets.

I would very much appreciate somebody's help and input maybe if there is an easier way of doing this process.

Kind Regards

See More: if statements in vba

Report •

May 26, 2011 at 01:54:48
within VBA editor of Excel, within "sheet change" you can trap which cells the drop downs are in for example, if the person name drop down is range "A1" and the month is in range "B1" you can trap them

if Target.address = "A1" then
if "A1".value = "Name" then

Read the appropriate data from the other sheet and display on this sheet

end if
end if

if target.address = "B1" then
if "B1".value = "Month" then
Read appropriate data from other sheet and display in this sheet
end if
end if

The above is just an example of how to achieve this, it will not work you will obviously need to modify it, but i cannot help you much more unless i see the code you have. Give it a go and let us know what you find and we can try to help further.

Report •
Related Solutions

Ask Question